예제 #1
0
        public static Deductible GetDedForTerm(Dictionary <string, object> termDictionary, Declarations declarations)
        {
            bool          isPerRisk = false;
            TermValueType dedPtype;

            if (termDictionary["PerRisk"].ToString() == "True")
            {
                isPerRisk = true;
            }
            int  index     = Convert.ToInt32(termDictionary["Index"]);
            bool franchise = Convert.ToBoolean(termDictionary["IsFranchise"]);
            DedInteractionType dedInterType = (DedInteractionType)Enum.Parse(typeof(DedInteractionType), termDictionary["Interaction"].ToString());

            if (dedInterType == DedInteractionType.MIN & declarations.MinimumAbsorbingDed)
            {
                dedInterType = DedInteractionType.Absorbing;
            }

            Value     dedValue;
            TimeBasis timeBasis;

            GetInfoFromJSONTermExp(termDictionary, out dedValue, out dedPtype, out timeBasis);

            return(new Deductible(franchise, dedInterType, dedValue, isPerRisk, dedPtype));
        }
예제 #2
0
 public void SetFinTerms(bool _dedIsFranchise, DedInteractionType _dedInterType, Value _deductible, bool _dedIsPerRisk, TermValueType _dedBaseType)
 {
     DedIsFranchise = _dedIsFranchise;
     Value          = _deductible;
     DedInterType   = _dedInterType;
     DedIsPerRisk   = _dedIsPerRisk;
     DedType        = _dedBaseType;
 }