pub struct TripState {
pub traveler: Option<TripTraveler>,
pub name: Option<String>,
pub travel_date: Option<NaiveDate>,
pub legs: Vec<Leg>,
pub extras: Vec<Extra>,
pub offer: Option<Offer>,
pub status: TripStatus,
pub external_status: Option<ExternalStatus>,
pub ticket_number: Option<String>,
pub refusal_code: Option<String>,
}Expand description
The persisted disruption case of one booking.
Fields§
§traveler: Option<TripTraveler>The traveler, once chosen.
name: Option<String>What the traveler calls this trip.
travel_date: Option<NaiveDate>The day the traveler would rather fly.
legs: Vec<Leg>The flights of the booking, in order.
extras: Vec<Extra>The extras, in the order they were added.
offer: Option<Offer>The rebooking the airline quoted, if any.
status: TripStatusLifecycle status.
external_status: Option<ExternalStatus>Where the rebooking stands with the airline, never collapsed into “done”.
ticket_number: Option<String>The new ticket’s number, once the airline issued it.
refusal_code: Option<String>Stable reason code of the airline’s last refusal, never free text.
Implementations§
Source§impl TripState
impl TripState
Sourcepub fn open_obligations(&self) -> Vec<TripObligation>
pub fn open_obligations(&self) -> Vec<TripObligation>
The obligations open in this state, in a stable order.
The per-extra payer obligation is parameterized by the extra’s identifier, so two extras without a payer are two distinct obligations.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Returns true when nothing is missing and a rebooking may be asked for.
Sourcepub fn extras_total_cents(&self) -> i64
pub fn extras_total_cents(&self) -> i64
Total of every extra in cents.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TripState
impl<'de> Deserialize<'de> for TripState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for TripState
impl StructuralPartialEq for TripState
Auto Trait Implementations§
impl Freeze for TripState
impl RefUnwindSafe for TripState
impl Send for TripState
impl Sync for TripState
impl Unpin for TripState
impl UnsafeUnpin for TripState
impl UnwindSafe for TripState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.