Skip to content

Api reference

components.kyc.public.enums

entity_identifier_type

EntityIdentifierType

Bases: AlanBaseEnum

Type of entity identifier used across KYC subcomponents.

Identifiers are typed with their country in case countries share the same identifier but use different formatting rules.

be_vat class-attribute instance-attribute
be_vat = 'be_vat'
fr_siren class-attribute instance-attribute
fr_siren = 'fr_siren'
fr_ssn class-attribute instance-attribute
fr_ssn = 'fr_ssn'
global_user_id class-attribute instance-attribute
global_user_id = 'global_user_id'

components.kyc.public.reimbursement_blocker

BlockReimbursementsReason

Bases: AlanBaseEnum

Reason why reimbursements are blocked for an entity.

ani_entry class-attribute instance-attribute

ani_entry = 'ani_entry'

ani_missing_justifications class-attribute instance-attribute

ani_missing_justifications = 'ani_missing_justifications'

ani_switch_overlapping class-attribute instance-attribute

ani_switch_overlapping = 'ani_switch_overlapping'

company_risk_rejected class-attribute instance-attribute

company_risk_rejected = 'company_risk_rejected'

fraud_suspicion class-attribute instance-attribute

fraud_suspicion = 'fraud_suspicion'

id_not_verified class-attribute instance-attribute

id_not_verified = 'id_not_verified'

manual class-attribute instance-attribute

manual = 'manual'

pending_company_kyc class-attribute instance-attribute

pending_company_kyc = 'pending_company_kyc'

pending_company_risk_scoring class-attribute instance-attribute

pending_company_risk_scoring = (
    "pending_company_risk_scoring"
)

unpaid_invoices class-attribute instance-attribute

unpaid_invoices = 'unpaid_invoices'

deactivate_reimbursement_blocker

deactivate_reimbursement_blocker(
    entity_identifier,
    entity_identifier_type,
    country,
    reason,
    commit=False,
)

Lift the active reimbursement blocker for an entity and reason.

Deactivates the matching active blocker (sets its ended_at). Does nothing if no active blocker exists for this entity, country and reason.

Source code in components/kyc/subcomponents/reimbursement_blocker/public/actions.py
def deactivate_reimbursement_blocker(
    entity_identifier: str,
    entity_identifier_type: EntityIdentifierType,
    country: Country,
    reason: BlockReimbursementsReason,
    commit: bool = False,
) -> None:
    """
    Lift the active reimbursement blocker for an entity and reason.

    Deactivates the matching active blocker (sets its ``ended_at``).
    Does nothing if no active blocker exists for this entity, country and reason.
    """
    _deactivate_reimbursement_blocker(
        entity_identifier=entity_identifier,
        entity_identifier_type=entity_identifier_type,
        country=country,
        reason=reason,
        commit=commit,
    )

install_reimbursement_blocker

install_reimbursement_blocker(
    entity_identifier,
    entity_identifier_type,
    country,
    reason,
    block_from=None,
    block_to=None,
    save=True,
)

Block reimbursements for an entity and reason.

The entity is targeted by (entity_identifier, entity_identifier_type, country), a single active blocker is enough to prevent reimbursements on its scope.

Idempotent: does nothing if the entity already has an active blocker for the same reason and the same block_from / block_to span.

Source code in components/kyc/subcomponents/reimbursement_blocker/public/actions.py
def install_reimbursement_blocker(
    entity_identifier: str,
    entity_identifier_type: EntityIdentifierType,
    country: Country,
    reason: BlockReimbursementsReason,
    block_from: date | None = None,
    block_to: date | None = None,
    save: bool = True,
) -> None:
    """
    Block reimbursements for an entity and reason.

    The entity is targeted by ``(entity_identifier, entity_identifier_type, country)``,
    a single active blocker is enough to prevent reimbursements on its scope.

    Idempotent: does nothing if the entity already has an active blocker
    for the same ``reason`` and the same ``block_from`` / ``block_to`` span.
    """
    _install_reimbursement_blocker(
        entity_identifier=entity_identifier,
        entity_identifier_type=entity_identifier_type,
        country=country,
        reason=reason,
        block_from=block_from,
        block_to=block_to,
        save=save,
    )

components.kyc.public.risk_scoring

RiskScoringCaseType

Bases: AlanBaseEnum

Type of risk scoring case.

business class-attribute instance-attribute

business = 'business'

RiskScoringProvider

Bases: AlanBaseEnum

Risk scoring provider.

ondorse class-attribute instance-attribute

ondorse = 'ondorse'