pub struct FareCombinationModel {
pub model: String,
pub combinable_carriers: Option<Vec<String>>,
pub is_valid_only_when_combined: Option<Option<bool>>,
pub reference_cluster: Option<Option<String>>,
pub allowed_clusters: Option<Option<Vec<String>>>,
pub allowed_common_contracts: Option<Vec<String>>,
}Expand description
FareCombinationModel : Defines the model according to which the fares can be combined.
Fields§
§model: StringA distributor needs to support the following models: SEPARATE_TICKET, SEPARATE_CONTRACT, CLUSTERING, COMBINING.
combinable_carriers: Option<Vec<String>>List of all carriers where the model can be applied, in case the list is empty all combinations are allowed.
is_valid_only_when_combined: Option<Option<bool>>This combination model applies only in case the fare is combined with another carrier
reference_cluster: Option<Option<String>>In case of CLUSTERING model: the cluster to which the fare belongs
allowed_clusters: Option<Option<Vec<String>>>In case of CLUSTERING model: the other clusters that allow a combination
allowed_common_contracts: Option<Vec<String>>List of carriers where a common contract with separate fulfillments are allowed.
Implementations§
Source§impl FareCombinationModel
impl FareCombinationModel
Sourcepub fn new(model: String) -> FareCombinationModel
pub fn new(model: String) -> FareCombinationModel
Defines the model according to which the fares can be combined.
Trait Implementations§
Source§impl Clone for FareCombinationModel
impl Clone for FareCombinationModel
Source§fn clone(&self) -> FareCombinationModel
fn clone(&self) -> FareCombinationModel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FareCombinationModel
impl Debug for FareCombinationModel
Source§impl Default for FareCombinationModel
impl Default for FareCombinationModel
Source§fn default() -> FareCombinationModel
fn default() -> FareCombinationModel
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FareCombinationModel
impl<'de> Deserialize<'de> for FareCombinationModel
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for FareCombinationModel
impl PartialEq for FareCombinationModel
Source§impl Serialize for FareCombinationModel
impl Serialize for FareCombinationModel
impl StructuralPartialEq for FareCombinationModel
Auto Trait Implementations§
impl Freeze for FareCombinationModel
impl RefUnwindSafe for FareCombinationModel
impl Send for FareCombinationModel
impl Sync for FareCombinationModel
impl Unpin for FareCombinationModel
impl UnwindSafe for FareCombinationModel
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
Mutably borrows from an owned value. Read more