pub mod airline;
pub mod apply;
pub mod command;
pub mod definition;
pub mod model;
pub mod state;
pub use airline::{AirlineMode, airline_answer};
pub use apply::{apply, extra_id_for, next_status_for, rejection, validate};
pub use command::{
AddExtraArgs, AssignPayerArgs, ChangeExtraArgs, ChangeTravelerArgs, LegArgs, OpenArgs,
SetNameArgs, SetTravelDateArgs, SetTravelerArgs, TravelerRecord, TripCommand, TripEvent,
operations,
};
pub use definition::{
REBOOK_CONFIRM_OPTION, REBOOK_DECLINE_OPTION, REBOOKING_CONFIRMATION_KEY, TripWorkflow,
};
pub use model::{
OTHER_TRAVELER_ID, REQUOTED_FARE_DIFFERENCE_CENTS, SAMPLE_EXTRA_DESCRIPTIONS,
SAMPLE_FARE_DIFFERENCE_CENTS, SAMPLE_NAME, SAMPLE_REFUSAL_CODE, SAMPLE_TICKET_NUMBER,
SAMPLE_TRAVELER_ID, TripModel, awaiting_rebooking_confirmation,
awaiting_rebooking_confirmation_at, complete_case, incomplete_case, other_traveler,
sample_legs, sample_new_extra, sample_offer, sample_quote, sample_travel_date, sample_traveler,
unassigned_case, with_offer,
};
pub use state::{
Extra, Leg, LegStatus, NewExtra, Offer, Payer, TripObligation, TripOutcome, TripPhase,
TripState, TripStatus, TripTraveler,
};
pub type TripExecutor = crate::workflows::InMemoryExecutor<TripWorkflow>;
pub const CONFORMANCE_CASE_ID: &str = "trip-conformance";
pub const CONFORMANCE_REVISION: u64 = 4;
#[must_use]
pub fn conformance_case() -> crate::executors::InMemoryCase<TripWorkflow> {
crate::executors::InMemoryCase::new(
turnframe_core::case::CaseRef::new(
"trip",
CONFORMANCE_CASE_ID,
turnframe_core::ids::CaseRevision(CONFORMANCE_REVISION),
),
Some(complete_case()),
TripCommand::AddExtra {
extra: sample_new_extra(1),
},
TripCommand::SetName {
value: "A different name".to_owned(),
},
TripCommand::SetName {
value: String::new(),
},
)
}