Skip to content

multiply_rule_data

Module for MultiplyRuleData class

!!! classes MultiplyRuleData

MultiplyRuleData (IMultiplyRuleData, RuleData)

Class for storing data related to multiply rule

Source code in entities/multiply_rule_data.py
class MultiplyRuleData(IMultiplyRuleData, RuleData):
    """Class for storing data related to multiply rule"""

    def __init__(
        self,
        name: str,
        multipliers: List[List[float]],
        input_variable: str,
        date_range: Optional[List[List[str]]] = None,
    ):
        super().__init__(name)
        self._input_variable = input_variable
        self._multipliers = multipliers
        self._date_range = date_range

    @property
    def input_variable(self) -> str:
        """Name of the input variable"""
        return self._input_variable

    @property
    def multipliers(self) -> List[List[float]]:
        """List of list with the multipliers"""
        return self._multipliers

    @property
    def date_range(self) -> Optional[List[List[str]]]:
        """List of list with start and end dates"""
        return self._date_range

date_range: Optional[List[List[str]]] property readonly

List of list with start and end dates

input_variable: str property readonly

Name of the input variable

multipliers: List[List[float]] property readonly

List of list with the multipliers