env: add CALCULATION_IRR
This commit is contained in:
parent
84f8b2fffe
commit
5ba21a49fc
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using EvoCalculator.Core.Models.BaseCalculation.Models.Request;
|
||||
using EvoCalculator.Core.Models.BaseCalculation.Models.Response;
|
||||
@ -8,12 +9,13 @@ namespace EvoCalculator.Core.Calculation;
|
||||
|
||||
public class BaseCalculation
|
||||
{
|
||||
const double IRR = 0.155;
|
||||
private Constants.Calculation constants;
|
||||
private double IRR = 0;
|
||||
private Constants.Calculation constants = new();
|
||||
|
||||
public BaseCalculation()
|
||||
{
|
||||
this.constants = new Constants.Calculation();
|
||||
var envCalculationIRR = Environment.GetEnvironmentVariable("CALCULATION_IRR");
|
||||
IRR = float.Parse(envCalculationIRR, CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
public ResponseBaseCalculation Calculate(RequestBaseCalculation requestBaseCalculation)
|
||||
|
||||
@ -26,7 +26,8 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"calculation_v2_date": "2021-09-02",
|
||||
"calculation_v3_date": "2022-03-30",
|
||||
"post_calculation_v2_date": "2022-04-14"
|
||||
"post_calculation_v2_date": "2022-04-14",
|
||||
"calculation_irr": "0.21"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user