Api reference
components.member_lifecycle.public.commands ¶
generate_frontend_types_file ¶
generate_frontend_typescript_types_files ¶
Use flask generate_frontend_typescript_types_files --execute to generate the frontend typescript types.
- File: "frontend/modules/member-lifecycle/add-dependents/src/queryTypes.ts"
- Types: all enums and entities
Source code in components/member_lifecycle/public/commands/generate_frontend_types_file.py
components.member_lifecycle.public.dependencies ¶
AddDependentsDependency ¶
AddDependentsDependency defines the interface that apps using the add_dependents subcomponent need to implement
Source code in components/member_lifecycle/subcomponents/add_dependents/protected/dependencies.py
can_add_dependents ¶
The method will return True if the user can add dependents
contract_allows_partner ¶
The method will return True if the primary's contract allows to add a partner
create_dependent ¶
The method will create the dependent for the primary user. Returns: The insurance profile ID of the created dependent.
Source code in components/member_lifecycle/subcomponents/add_dependents/protected/dependencies.py
get_age_boundaries_by_dependent_type ¶
The method will return the age boundaries of a dependent for the user Boundaries are included, meaning the dependent age should be withing those boundaries, including the boundaries.
Source code in components/member_lifecycle/subcomponents/add_dependents/protected/dependencies.py
get_child_account_minimum_age ¶
Returns the minimum age required for a child dependent to have an Alan account. Returns None if child dependents are not allowed to have accounts.
Source code in components/member_lifecycle/subcomponents/add_dependents/protected/dependencies.py
get_coverage_module_choices ¶
The method will return the coverage module choices for the user.
Source code in components/member_lifecycle/subcomponents/add_dependents/protected/dependencies.py
get_default_coverage_module ¶
Returns the default coverage module that will be applied to new dependents
Source code in components/member_lifecycle/subcomponents/add_dependents/protected/dependencies.py
get_health_contract_info ¶
The method will return the user's health contract info, including affiliation delay if present
Source code in components/member_lifecycle/subcomponents/add_dependents/protected/dependencies.py
get_immediate_coverage_in_first_months ¶
The method will return if the dependent will be covered immediately in the first months of the primary's coverage.
Source code in components/member_lifecycle/subcomponents/add_dependents/protected/dependencies.py
get_minimum_coverage_months ¶
The method will return the minimum number of months of coverage required for the dependent.
get_past_dependents ¶
This method will return the past dependents of the user, relative to the start date of the current or next affiliation on on_date. It will exclude dependents that are active on or after on_date.
Source code in components/member_lifecycle/subcomponents/add_dependents/protected/dependencies.py
get_possible_start_dates ¶
get_possible_start_dates(
user_id,
new_dependent_birth_date,
at_date=None,
existing_dependent_user_id=None,
)
The method will return the possible coverage start dates for the user.
Source code in components/member_lifecycle/subcomponents/add_dependents/protected/dependencies.py
get_prices_and_conditions_config ¶
The method will return the features enablement for prices and conditions
Source code in components/member_lifecycle/subcomponents/add_dependents/protected/dependencies.py
has_existing_partner ¶
The method will return True if the user has an existing partner TODO Maybe we actually want to embed this kind of logic/model inside the price itself We might need to display other information such as the maximum age of the children, etc... Let's see how it grows..
Source code in components/member_lifecycle/subcomponents/add_dependents/protected/dependencies.py
require_coverage_module_choice ¶
The method will return wether the add dependent flow requires the choice of a coverage option for the dependent.
Source code in components/member_lifecycle/subcomponents/add_dependents/protected/dependencies.py
require_coverage_start_date_choice ¶
The method will return wether the add dependent flow requires the choice of a coverage start date for the dependent.
Source code in components/member_lifecycle/subcomponents/add_dependents/protected/dependencies.py
require_gender ¶
The method will return wether the add dependent flow requires a gender to be provided.
MemberLifecycleDependency ¶
MemberLifecycleDependency defines the interface that apps using the member_lifecycle component need to implement
Source code in components/member_lifecycle/internal/dependencies/member_lifecycle.py
merge_users ¶
The method will merge the source user into the target user and return some logs about the changes
Source code in components/member_lifecycle/internal/dependencies/member_lifecycle.py
PastDependent
dataclass
¶
set_app_dependency ¶
Sets the member_lifecycle dependency to the app so it can be accessed within this component at runtime
Source code in components/member_lifecycle/internal/dependencies/member_lifecycle.py
components.member_lifecycle.public.entities ¶
AffiliationDelay
dataclass
¶
AgeBoundaries
dataclass
¶
CoverageModuleInfo
dataclass
¶
CoverageModuleInfo(
coverage_module_name,
coverages,
is_upgrade,
partner_price=None,
child_price=None,
)
Bases: DataClassJsonMixin
CoverageType ¶
Bases: AlanBaseEnum
CoverageType describes each class of guarantee.
Note: "ambulatory" means "daily care" + "dental".
CreateDependentPayload
dataclass
¶
CreateDependentPayload(
dependent_user_id,
first_name,
last_name,
birth_date,
gender,
coverage_start_date,
type,
coverage_module_name,
)
DependentSpecs
dataclass
¶
DependentsAgeBoundaries
dataclass
¶
DependentsParticipation
dataclass
¶
DependentsPrices
dataclass
¶
HealthContractInfo
dataclass
¶
HealthContractInfo(
dependents_participation,
waiting_period,
affiliation_delay,
primary_coverage_start_date,
is_direct_billing,
)
Bases: DataClassJsonMixin
The fields will be None if the information cannot be matched to the expected dataclass.
NewDependentsPriceBreakdown
dataclass
¶
Price
dataclass
¶
Bases: DataClassJsonMixin
Source code in components/member_lifecycle/subcomponents/prices/internal/domain/entities/dependent_price.py
__post_init__ ¶
PricesAndConditionsConfig
dataclass
¶
PricesAndConditionsConfig(
child_covered_until_max_age,
membership,
fr_social_security,
be_social_security,
be_fiscally_dependent_age,
)
Bases: DataClassJsonMixin
Configuration for the PricesAndConditions component.
WaitingPeriod
dataclass
¶
components.member_lifecycle.public.ports ¶
PriceProvider ¶
get_dependents_price_breakdown ¶
Returns the price breakdown for a new dependent. This is used to display the prices when adding a new dependent.
Source code in components/member_lifecycle/subcomponents/prices/internal/domain/ports/price_provider.py
get_dependents_prices ¶
Returns the prices for all potential dependents of a user.