Skip to main content

Module model

Module model 

Source
Expand description

The exploration model and the ready-made fixtures of the trip sample.

Structs§

TripModel
The exploration model of the trip workflow.

Constants§

MODEL_EXTRA_BUDGET
Most extras the exploration model adds: the domain’s own maximum, so the cap and the refusal that guards it are inside the explored states. The state space stays bounded because extras are added in a fixed order and only the first one without a payer is given one, so the paid extras are always a prefix.
OTHER_TRAVELER_ID
Identifier of a second traveler, used to exercise the sensitive change.
REQUOTED_FARE_DIFFERENCE_CENTS
The fare difference after the airline quotes again, in cents: €132.
SAMPLE_EXTRA_DESCRIPTIONS
Descriptions of the extras the model adds, in order.
SAMPLE_FARE_DIFFERENCE_CENTS
The fare difference of the sample offer, in cents: €84.
SAMPLE_NAME
Name the model gives the trip.
SAMPLE_REFUSAL_CODE
Reason code the sample airline returns when it refuses a rebooking.
SAMPLE_TICKET_NUMBER
Ticket number the sample airline issues.
SAMPLE_TRAVELER_ID
Identifier of the traveler the model puts on cases.

Functions§

awaiting_rebooking_confirmation
A complete case whose rebooking card for the outbound leg is waiting for a click, at the sample fare difference.
awaiting_rebooking_confirmation_at
A complete case whose rebooking card for the outbound leg is waiting for a click, at the given fare difference.
complete_case
A case with every obligation met, still in Collecting.
incomplete_case
A case with its traveler, the booking’s legs and one paid extra, but no name and no travel date: two obligations are still open.
other_traveler
A second traveler, for testing the sensitive traveler change.
sample_legs
The two flights of the sample booking: the outbound was cancelled, the return flies as booked.
sample_new_extra
The n-th sample extra, without a payer.
sample_offer
The rebooking the airline quotes for a leg of the sample booking.
sample_quote
The airline’s quote of the sample offer for leg, as the command it applies.
sample_travel_date
The travel date the model sets.
sample_traveler
The traveler the model puts on cases.
unassigned_case
A case whose one extra has no payer yet, so TripObligation::AssignPayer is open: the state where a user asks who can pay while the flow is collecting exactly that field.
with_offer
A complete case with the airline’s quote for leg.