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§
- Attendance
Visit Count - Count of recent daycare visits used to score pass or membership opportunities.
- Evidence
- Source evidence used to classify daycare package or membership opportunities.
- Evidence
Builder - Use builder syntax to set the inputs and finish with
build(). - Policy
- Deterministic policy that scores daycare package opportunities from evidence.
Enums§
- Care
Eligibility - Care eligibility state used before recommending daycare packages.
- Decision
- Package-opportunity decision staff may review before contacting a customer.
- NoOpportunity
Reason - Reasons evidence does not indicate a new daycare package opportunity.
- Opportunity
Score - Strength of a daycare package opportunity from recent attendance evidence.
- Package
State - Existing package coverage state for a customer and pet.
- Payment
State - Billing state used to suppress recommendations when collection or review is needed.
- Suppression
Reason - Reasons daycare package recommendations are suppressed before staff review.