Problem
Cancellation policy enforcement is inconsistently applied across booking types. Different refund amounts are computed in different places with no single codified source of truth.
Proposed Solution
Create contracts/cntr/cancellation_policy.rs defining #[derive(Debug, PartialEq, Clone)] pub enum CancellationPolicy { Flexible, Moderate, Strict } and implementing pub fn apply_policy(policy: CancellationPolicy, hours_before_start: u64, amount_stroops: i128) -> i128. Rules — Flexible: always 100% refund. Moderate: 100% if 48h+, 50% if 24–47h, 0% if <24h. Strict: 100% if 96h+, 0% otherwise. Integer arithmetic only. All implementation must live inside contracts/cntr/.
Acceptance Criteria
Problem
Cancellation policy enforcement is inconsistently applied across booking types. Different refund amounts are computed in different places with no single codified source of truth.
Proposed Solution
Create
contracts/cntr/cancellation_policy.rsdefining#[derive(Debug, PartialEq, Clone)] pub enum CancellationPolicy { Flexible, Moderate, Strict }and implementingpub fn apply_policy(policy: CancellationPolicy, hours_before_start: u64, amount_stroops: i128) -> i128. Rules — Flexible: always 100% refund. Moderate: 100% if 48h+, 50% if 24–47h, 0% if <24h. Strict: 100% if 96h+, 0% otherwise. Integer arithmetic only. All implementation must live insidecontracts/cntr/.Acceptance Criteria
contracts/cntr/cancellation_policy.rsCancellationPolicyderivesDebug,PartialEq,Cloneamount_stroopscargo test