Reservation

Struct Reservation 

Source
pub struct Reservation {
Show 41 fields pub object_type: String, pub id: String, pub summary: Option<Option<String>>, pub created_on: String, pub confirmable_until: Option<String>, pub valid_from: String, pub valid_until: Option<Option<String>>, pub confirmed_on: Option<Option<String>>, pub confirmed_fulfillment_options: Option<Box<FulfillmentOption>>, pub price: Box<Price>, pub refund_amount: Option<Box<Price>>, pub trip_coverage: Option<Box<TripCoverage>>, pub inbound_trip_coverage: Option<Box<TripCoverage>>, pub summary_product_id: Option<String>, pub products: Option<Vec<ProductLegAssociation>>, pub status: BookingPartStatus, pub pricing_status: Option<String>, pub offer_mode: Option<OfferMode>, pub booking_part_code: Option<String>, pub distributor_booking_ref: Option<Option<String>>, pub retailer_booking_ref: Option<Option<String>>, pub passenger_ids: Vec<String>, pub available_fulfillment_options: Option<Vec<FulfillmentOption>>, pub refundable: RefundType, pub exchangeable: ExchangeableType, pub after_sale_conditions: Option<Vec<AfterSaleCondition>>, pub after_sales_override_details: Option<Box<AfterSalesOverrideDetails>>, pub applied_corporate_codes: Option<Vec<CorporateCode>>, pub applied_passenger_types: Option<Vec<AppliedPassengerType>>, pub applied_promotion_codes: Option<Vec<PromotionCode>>, pub applied_reductions: Option<Vec<CardReference>>, pub indicated_consumption: Option<Box<IndicatedConsumption>>, pub accounting_ref: Option<Box<AccountingRef>>, pub granted_reduction_amounts: Option<Box<GrantedReductionAmounts>>, pub place_selection: Option<Box<PlaceSelection>>, pub place_allocation: Option<Box<PlaceAllocation>>, pub fee_refs: Option<Vec<BookingPartReference>>, pub ancillary_refs: Option<Vec<BookingPartReference>>, pub available_place_preferences: Option<Vec<AvailablePlacePreferences>>, pub graphical_reservation_supported: Option<Option<bool>>, pub supported_place_selection_flows: Option<Vec<String>>,
}
Expand description

Reservation : Reservation includes the reference to the in the initial offer. The offer needs to be updated with the selected places before the confirmation which creates the reservation details including the reserved places.

Fields§

§object_type: String

Attribute is used as discriminator for inheritance between data types.

§id: String§summary: Option<Option<String>>§created_on: String

Validity of offer towards passenger

§confirmable_until: Option<String>

confirmationTimeLimit in booking should be used. Date until the booking part needs to be confirmed. Must be provided for a booking part in PREBOOKED stated. For later states, the value is ignored and can be null.

§valid_from: String§valid_until: Option<Option<String>>

Validity of offer towards passenger

§confirmed_on: Option<Option<String>>§confirmed_fulfillment_options: Option<Box<FulfillmentOption>>§price: Box<Price>§refund_amount: Option<Box<Price>>§trip_coverage: Option<Box<TripCoverage>>§inbound_trip_coverage: Option<Box<TripCoverage>>§summary_product_id: Option<String>

Id of the product representing the commercial attributes of this booking part. Although not currently mandatory, this attribute should in all cases be filled in order to allow matching a booking response to the data in the booking request

§products: Option<Vec<ProductLegAssociation>>

In offer mode, in almost all cases exactly one product is referenced. Only on some French trips consisting of a TGV and a TER two products need to be used. In fare mode, no product exists as first needs to created from the different fares.

§status: BookingPartStatus§pricing_status: Option<String>

payment status in post-payment scenarios

§offer_mode: Option<OfferMode>§booking_part_code: Option<String>

The unique booking code for the part in the provider system.

§distributor_booking_ref: Option<Option<String>>

reference to the booking in the downstream distributor system

§retailer_booking_ref: Option<Option<String>>

reference to the booking in the downstream distributor system

§passenger_ids: Vec<String>

Id of the passenger

§available_fulfillment_options: Option<Vec<FulfillmentOption>>§refundable: RefundType§exchangeable: ExchangeableType§after_sale_conditions: Option<Vec<AfterSaleCondition>>

Fine grained specification of the after sale condition of the booking.

§after_sales_override_details: Option<Box<AfterSalesOverrideDetails>>§applied_corporate_codes: Option<Vec<CorporateCode>>§applied_passenger_types: Option<Vec<AppliedPassengerType>>§applied_promotion_codes: Option<Vec<PromotionCode>>§applied_reductions: Option<Vec<CardReference>>§indicated_consumption: Option<Box<IndicatedConsumption>>§accounting_ref: Option<Box<AccountingRef>>§granted_reduction_amounts: Option<Box<GrantedReductionAmounts>>§place_selection: Option<Box<PlaceSelection>>§place_allocation: Option<Box<PlaceAllocation>>§fee_refs: Option<Vec<BookingPartReference>>§ancillary_refs: Option<Vec<BookingPartReference>>

DEPRECATED Formerly OSDM allowed to link ancillaries to reservation. Since 3.7.0, it is recommended to only link reservations to admissions, ancillaries, and not the other way round. Referrence will be removed in 4.0.0

§available_place_preferences: Option<Vec<AvailablePlacePreferences>>

options for place selection in case the place selection is made after the pre-booking.

§graphical_reservation_supported: Option<Option<bool>>

more detailed information on options for place selection and possible fees are part of availablePlacePreferences

§supported_place_selection_flows: Option<Vec<String>>

Supported place selection flows might depend on available places.

Implementations§

Source§

impl Reservation

Source

pub fn new( object_type: String, id: String, created_on: String, valid_from: String, price: Price, status: BookingPartStatus, passenger_ids: Vec<String>, refundable: RefundType, exchangeable: ExchangeableType, ) -> Reservation

Reservation includes the reference to the in the initial offer. The offer needs to be updated with the selected places before the confirmation which creates the reservation details including the reserved places.

Trait Implementations§

Source§

impl Clone for Reservation

Source§

fn clone(&self) -> Reservation

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Reservation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Reservation

Source§

fn default() -> Reservation

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Reservation

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Reservation

Source§

fn eq(&self, other: &Reservation) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Reservation

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Reservation

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,