pub struct Tariff {
pub meta: Bo4eMeta,
pub tariff_name: Option<String>,
pub description: Option<String>,
pub division: Option<Division>,
pub customer_type: Option<CustomerType>,
pub validity_period: Option<TimePeriod>,
pub base_price: Option<Price>,
pub working_price: Option<Price>,
pub price_tiers: Vec<PriceTier>,
pub calculation_parameters: Option<TariffCalculationParameter>,
pub energy_mix: Option<EnergyMix>,
pub supplier: Option<Box<BusinessPartner>>,
}Expand description
A tariff definition.
German: Tarif
§Example
use bo4e_core::bo::Tariff;
use bo4e_core::com::Price;
use bo4e_core::enums::{CustomerType, Division};
let tariff = Tariff {
tariff_name: Some("Haushaltstarif 2024".to_string()),
division: Some(Division::Electricity),
customer_type: Some(CustomerType::Private),
base_price: Some(Price::eur_per_month(9.95)),
working_price: Some(Price::eur_per_kwh(0.32)),
..Default::default()
};Fields§
§meta: Bo4eMetaBO4E metadata
tariff_name: Option<String>Tariff name (Tarifname)
description: Option<String>Tariff description (Tarifbeschreibung)
division: Option<Division>Energy division (Sparte)
customer_type: Option<CustomerType>Target customer type (Kundentyp)
validity_period: Option<TimePeriod>Validity period (Gueltigkeitszeitraum)
base_price: Option<Price>Base price (Grundpreis)
working_price: Option<Price>Working price (Arbeitspreis)
price_tiers: Vec<PriceTier>Price tiers (Preisstaffeln)
calculation_parameters: Option<TariffCalculationParameter>Calculation parameters (Tarifberechnungsparameter)
energy_mix: Option<EnergyMix>Energy mix composition (Energiemix)
supplier: Option<Box<BusinessPartner>>Provider/supplier
Trait Implementations§
Source§impl Bo4eObject for Tariff
impl Bo4eObject for Tariff
Source§fn type_name_german() -> &'static str
fn type_name_german() -> &'static str
Returns the German type name as used in the
_typ field. Read moreSource§fn type_name_english() -> &'static str
fn type_name_english() -> &'static str
Returns the English type name. Read more
Source§impl<'de> Deserialize<'de> for Tariff
impl<'de> Deserialize<'de> for Tariff
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
impl StructuralPartialEq for Tariff
Auto Trait Implementations§
impl Freeze for Tariff
impl RefUnwindSafe for Tariff
impl Send for Tariff
impl Sync for Tariff
impl Unpin for Tariff
impl UnsafeUnpin for Tariff
impl UnwindSafe for Tariff
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