pub struct Discount {
pub meta: Bo4eMeta,
pub description: Option<String>,
pub discount_type: Option<SurchargeType>,
pub value: Option<f64>,
pub currency: Option<Currency>,
pub conditions: Option<String>,
}Expand description
A discount applied to a price.
German: Rabatt
§Example
use bo4e_core::com::Discount;
let discount = Discount {
description: Some("Stammkundenrabatt".to_string()),
value: Some(10.0),
..Default::default()
};Fields§
§meta: Bo4eMetaBO4E metadata
description: Option<String>Description/name of the discount (Bezeichnung)
discount_type: Option<SurchargeType>Type of discount (Rabatttyp)
value: Option<f64>Discount value (Wert)
currency: Option<Currency>Currency (Waehrung)
conditions: Option<String>Conditions for the discount (Bedingungen)
Trait Implementations§
Source§impl Bo4eObject for Discount
impl Bo4eObject for Discount
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 Discount
impl<'de> Deserialize<'de> for Discount
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 Discount
Auto Trait Implementations§
impl Freeze for Discount
impl RefUnwindSafe for Discount
impl Send for Discount
impl Sync for Discount
impl Unpin for Discount
impl UnwindSafe for Discount
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