Entitlement Manager

The entitlement manager determines what a beneficiary is entitled to for a given cycle.

g2p_programs.models.managers.entitlement_manager provides the class BaseEntitlementManager define the interface for this manager. DefaultCashEntitlementManager is the default implementation of this class for cash distribution.

The BaseEntitlementManager can be extended to implement any other type of distribution such as in-kind.

class g2p_programs.models.managers.entitlement_manager.BaseEntitlementManager(*args: Any, **kwargs: Any)[source]
prepare_entitlements(cycle, cycle_memberships)[source]

This method is used to prepare the entitlement list of the beneficiaries. :param cycle: The cycle. :param cycle_memberships: The beneficiaries. :return:

validate_entitlements(cycle, cycle_memberships)[source]

This method is used to validate the entitlement list of the beneficiaries. :param cycle: The cycle. :param cycle_memberships: The beneficiaries. :return:

class g2p_programs.models.managers.entitlement_manager.DefaultCashEntitlementManager(*args: Any, **kwargs: Any)[source]
currency_id = 'res.currency'
entitlement_validation_group_id = 'res.groups'
prepare_entitlements(cycle, beneficiaries)[source]
validate_entitlements(cycle, cycle_memberships)[source]