Skip to main content

Module package_opportunity

Module package_opportunity 

Source
Expand description

Daycare package-opportunity policy for review-gated membership/pass recommendations.

use domain::{daycare, entities, policy};
use uuid::Uuid;

let evidence = daycare::package_opportunity::Evidence::builder()
    .customer_id(entities::CustomerId(Uuid::nil()))
    .pet_id(entities::PetId(Uuid::nil()))
    .attendance_visits(daycare::package_opportunity::AttendanceVisitCount::new(8))
    .eligibility(daycare::package_opportunity::CareEligibility::Cleared)
    .package_state(daycare::package_opportunity::PackageState::PayPerVisit)
    .payment_state(daycare::package_opportunity::PaymentState::Current)
    .build();

assert_eq!(
    daycare::package_opportunity::Policy.classify(&evidence),
    daycare::package_opportunity::Decision::RecommendStaffReview {
        score: daycare::package_opportunity::OpportunityScore::Strong,
        gate: policy::ReviewGate::CustomerMessageApproval,
    },
);

Structs§

AttendanceVisitCount
Count of recent daycare visits used to score pass or membership opportunities.
Evidence
Source evidence used to classify daycare package or membership opportunities.
EvidenceBuilder
Use builder syntax to set the inputs and finish with build().
Policy
Deterministic policy that scores daycare package opportunities from evidence.

Enums§

CareEligibility
Care eligibility state used before recommending daycare packages.
Decision
Package-opportunity decision staff may review before contacting a customer.
NoOpportunityReason
Reasons evidence does not indicate a new daycare package opportunity.
OpportunityScore
Strength of a daycare package opportunity from recent attendance evidence.
PackageState
Existing package coverage state for a customer and pet.
PaymentState
Billing state used to suppress recommendations when collection or review is needed.
SuppressionReason
Reasons daycare package recommendations are suppressed before staff review.