/// <summary>
 /// Initializes a new instance of the <see cref="RetirementCalculatorExpensesRequest" /> class.
 /// </summary>
 /// <param name="retirementSavings">retirementSavings (default to 0.0F).</param>
 /// <param name="currentAge">currentAge (required).</param>
 /// <param name="accountIds">accountIds.</param>
 /// <param name="retirementIncome">retirementIncome (default to 0.0F).</param>
 /// <param name="retirementTax">retirementTax (default to 0.0F).</param>
 /// <param name="deathAge">deathAge (required).</param>
 /// <param name="retirementAge">retirementAge (default to 65).</param>
 /// <param name="percentOfExpensesCovered">percentOfExpensesCovered (default to 1.0F).</param>
 /// <param name="portfolioReturn">portfolioReturn (required).</param>
 /// <param name="depositSchedule">depositSchedule.</param>
 /// <param name="inflationRate">inflationRate (default to 0.0F).</param>
 /// <param name="aggregationAccountIds">aggregationAccountIds.</param>
 public RetirementCalculatorExpensesRequest(float?retirementSavings = 0.0F, int?currentAge = default(int?), List <Guid?> accountIds = default(List <Guid?>), float?retirementIncome = 0.0F, float?retirementTax = 0.0F, int?deathAge = default(int?), int?retirementAge = 65, float?percentOfExpensesCovered = 1.0F, float?portfolioReturn = default(float?), CalculatorDepositSchedule1 depositSchedule = default(CalculatorDepositSchedule1), float?inflationRate = 0.0F, List <Guid?> aggregationAccountIds = default(List <Guid?>))
 {
     // to ensure "currentAge" is required (not null)
     if (currentAge == null)
     {
         throw new InvalidDataException("currentAge is a required property for RetirementCalculatorExpensesRequest and cannot be null");
     }
     else
     {
         this.CurrentAge = currentAge;
     }
     // to ensure "deathAge" is required (not null)
     if (deathAge == null)
     {
         throw new InvalidDataException("deathAge is a required property for RetirementCalculatorExpensesRequest and cannot be null");
     }
     else
     {
         this.DeathAge = deathAge;
     }
     // to ensure "portfolioReturn" is required (not null)
     if (portfolioReturn == null)
     {
         throw new InvalidDataException("portfolioReturn is a required property for RetirementCalculatorExpensesRequest and cannot be null");
     }
     else
     {
         this.PortfolioReturn = portfolioReturn;
     }
     // use default value if no "retirementSavings" provided
     if (retirementSavings == null)
     {
         this.RetirementSavings = 0.0F;
     }
     else
     {
         this.RetirementSavings = retirementSavings;
     }
     this.AccountIds = accountIds;
     // use default value if no "retirementIncome" provided
     if (retirementIncome == null)
     {
         this.RetirementIncome = 0.0F;
     }
     else
     {
         this.RetirementIncome = retirementIncome;
     }
     // use default value if no "retirementTax" provided
     if (retirementTax == null)
     {
         this.RetirementTax = 0.0F;
     }
     else
     {
         this.RetirementTax = retirementTax;
     }
     // use default value if no "retirementAge" provided
     if (retirementAge == null)
     {
         this.RetirementAge = 65;
     }
     else
     {
         this.RetirementAge = retirementAge;
     }
     // use default value if no "percentOfExpensesCovered" provided
     if (percentOfExpensesCovered == null)
     {
         this.PercentOfExpensesCovered = 1.0F;
     }
     else
     {
         this.PercentOfExpensesCovered = percentOfExpensesCovered;
     }
     this.DepositSchedule = depositSchedule;
     // use default value if no "inflationRate" provided
     if (inflationRate == null)
     {
         this.InflationRate = 0.0F;
     }
     else
     {
         this.InflationRate = inflationRate;
     }
     this.AggregationAccountIds = aggregationAccountIds;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="EducationCalculatorAnnualCostRequest" /> class.
 /// </summary>
 /// <param name="educationInflationRate">educationInflationRate (default to 0.05F).</param>
 /// <param name="decumulationHorizon">decumulationHorizon (required).</param>
 /// <param name="accumulationHorizon">accumulationHorizon (required).</param>
 /// <param name="accountIds">accountIds.</param>
 /// <param name="taxRate">taxRate (default to 0.0F).</param>
 /// <param name="generalInflationRate">generalInflationRate (default to 0.0F).</param>
 /// <param name="portfolioReturn">portfolioReturn (required).</param>
 /// <param name="depositSchedule">depositSchedule.</param>
 /// <param name="initialBalance">initialBalance (default to 0.0F).</param>
 /// <param name="percentOfCostsCovered">percentOfCostsCovered (default to 1.0F).</param>
 /// <param name="aggregationAccountIds">aggregationAccountIds.</param>
 public EducationCalculatorAnnualCostRequest(float?educationInflationRate = 0.05F, int?decumulationHorizon = default(int?), int?accumulationHorizon = default(int?), List <Guid?> accountIds = default(List <Guid?>), float?taxRate = 0.0F, float?generalInflationRate = 0.0F, float?portfolioReturn = default(float?), CalculatorDepositSchedule1 depositSchedule = default(CalculatorDepositSchedule1), float?initialBalance = 0.0F, float?percentOfCostsCovered = 1.0F, List <Guid?> aggregationAccountIds = default(List <Guid?>))
 {
     // to ensure "decumulationHorizon" is required (not null)
     if (decumulationHorizon == null)
     {
         throw new InvalidDataException("decumulationHorizon is a required property for EducationCalculatorAnnualCostRequest 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 EducationCalculatorAnnualCostRequest and cannot be null");
     }
     else
     {
         this.AccumulationHorizon = accumulationHorizon;
     }
     // to ensure "portfolioReturn" is required (not null)
     if (portfolioReturn == null)
     {
         throw new InvalidDataException("portfolioReturn is a required property for EducationCalculatorAnnualCostRequest and cannot be null");
     }
     else
     {
         this.PortfolioReturn = portfolioReturn;
     }
     // use default value if no "educationInflationRate" provided
     if (educationInflationRate == null)
     {
         this.EducationInflationRate = 0.05F;
     }
     else
     {
         this.EducationInflationRate = educationInflationRate;
     }
     this.AccountIds = accountIds;
     // use default value if no "taxRate" provided
     if (taxRate == null)
     {
         this.TaxRate = 0.0F;
     }
     else
     {
         this.TaxRate = taxRate;
     }
     // use default value if no "generalInflationRate" provided
     if (generalInflationRate == null)
     {
         this.GeneralInflationRate = 0.0F;
     }
     else
     {
         this.GeneralInflationRate = generalInflationRate;
     }
     this.DepositSchedule = depositSchedule;
     // use default value if no "initialBalance" provided
     if (initialBalance == null)
     {
         this.InitialBalance = 0.0F;
     }
     else
     {
         this.InitialBalance = initialBalance;
     }
     // use default value if no "percentOfCostsCovered" provided
     if (percentOfCostsCovered == null)
     {
         this.PercentOfCostsCovered = 1.0F;
     }
     else
     {
         this.PercentOfCostsCovered = percentOfCostsCovered;
     }
     this.AggregationAccountIds = aggregationAccountIds;
 }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PurchaseCalculatorHorizonRequest" /> class.
 /// </summary>
 /// <param name="accountIds">accountIds.</param>
 /// <param name="investmentTax">investmentTax (default to 0.0F).</param>
 /// <param name="portfolioReturn">portfolioReturn (required).</param>
 /// <param name="depositSchedule">depositSchedule.</param>
 /// <param name="currentSavings">currentSavings (default to 0.0F).</param>
 /// <param name="purchaseAmount">purchaseAmount (required).</param>
 /// <param name="inflationRate">inflationRate (default to 0.0F).</param>
 /// <param name="aggregationAccountIds">aggregationAccountIds.</param>
 public PurchaseCalculatorHorizonRequest(List <Guid?> accountIds = default(List <Guid?>), float?investmentTax = 0.0F, float?portfolioReturn = default(float?), CalculatorDepositSchedule1 depositSchedule = default(CalculatorDepositSchedule1), float?currentSavings = 0.0F, float?purchaseAmount = default(float?), float?inflationRate = 0.0F, List <Guid?> aggregationAccountIds = default(List <Guid?>))
 {
     // to ensure "portfolioReturn" is required (not null)
     if (portfolioReturn == null)
     {
         throw new InvalidDataException("portfolioReturn is a required property for PurchaseCalculatorHorizonRequest and cannot be null");
     }
     else
     {
         this.PortfolioReturn = portfolioReturn;
     }
     // to ensure "purchaseAmount" is required (not null)
     if (purchaseAmount == null)
     {
         throw new InvalidDataException("purchaseAmount is a required property for PurchaseCalculatorHorizonRequest and cannot be null");
     }
     else
     {
         this.PurchaseAmount = purchaseAmount;
     }
     this.AccountIds = accountIds;
     // use default value if no "investmentTax" provided
     if (investmentTax == null)
     {
         this.InvestmentTax = 0.0F;
     }
     else
     {
         this.InvestmentTax = investmentTax;
     }
     this.DepositSchedule = depositSchedule;
     // use default value if no "currentSavings" provided
     if (currentSavings == null)
     {
         this.CurrentSavings = 0.0F;
     }
     else
     {
         this.CurrentSavings = currentSavings;
     }
     // use default value if no "inflationRate" provided
     if (inflationRate == null)
     {
         this.InflationRate = 0.0F;
     }
     else
     {
         this.InflationRate = inflationRate;
     }
     this.AggregationAccountIds = aggregationAccountIds;
 }