Skip to content
Snippets Groups Projects
Commit 3ed09c30 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Add attributes Parameter, which can be used by tariffs to enable...

Add attributes Parameter, which can be used by tariffs to enable contract-specific behavior (e.g. an indicator whether a contract is the main slice or a top-up / additional payment with different costs, etc.).

Access via contract$Parameters$ContractData$attributes$...
parent 606b96f1
Branches
Tags
No related merge requests found
...@@ -334,6 +334,9 @@ InsuranceContract.Values = list( ...@@ -334,6 +334,9 @@ InsuranceContract.Values = list(
#' defining a corresponding \code{$minCosts}). Linearly interpolates #' defining a corresponding \code{$minCosts}). Linearly interpolates
#' between \code{$Costs} and \code{$minCosts}, if the latter is set. #' between \code{$Costs} and \code{$minCosts}, if the latter is set.
#' Otherwise is has no effect.} #' Otherwise is has no effect.}
#' \item{\code{$attributes}}{Additional custom attributes (as a named list),
#' which can be used for particular behaviour of different contracts
#' or contract slices.}
#' } #' }
#' #'
#' ## Elements of sublist \code{InsuranceContract.ParameterDefault$ContractState} #' ## Elements of sublist \code{InsuranceContract.ParameterDefault$ContractState}
...@@ -543,7 +546,8 @@ InsuranceContract.ParameterDefaults = list( ...@@ -543,7 +546,8 @@ InsuranceContract.ParameterDefaults = list(
annuityIncrease = 1, # The yearly growth factor of the annuity payments, i.e. 1.05 means +5% incrase each year; a vector describes the annuity unit payments for all years annuityIncrease = 1, # The yearly growth factor of the annuity payments, i.e. 1.05 means +5% incrase each year; a vector describes the annuity unit payments for all years
deathBenefit = 1, # The yearly relative death benefit (relative to the initial sum insured); Can be fixed, e.g. 0.5 for 50% death cover, or set to a function(len, params, values) like deathBenefit = deathBenefit.linearDecreasing deathBenefit = 1, # The yearly relative death benefit (relative to the initial sum insured); Can be fixed, e.g. 0.5 for 50% death cover, or set to a function(len, params, values) like deathBenefit = deathBenefit.linearDecreasing
costWaiver = 0 # The cost waiver (up to minCosts, 0=no cost waiver, 1=full cost waiver down to minCosts) costWaiver = 0, # The cost waiver (up to minCosts, 0=no cost waiver, 1=full cost waiver down to minCosts)
attributes = list() # List of additional attributes with custom meaning (not standardized, but can be used by any tariff to implement custom behavior for certain contracts or slices)
), ),
ContractState = list( ContractState = list(
premiumWaiver = FALSE, # contract is paid-up premiumWaiver = FALSE, # contract is paid-up
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment