pub struct PriceLimit {
pub before_taxes: Number,
pub after_taxes: Option<Number>,
pub extensions: Extensions,
}Available on crate feature
v2_3_0 only.Expand description
A minimum or maximum total cost for a Charging Session. New in OCPI 2.3.0.
As the taxes on a Charging Session might be different for different parts of the Session, there might be situations where the minimum cost after taxes is reached earlier or later than the minimum price before taxes. So as a rule, they both apply.
Spec: 2.3.0 §mod_tariffs_pricelimit_class
Fields§
§before_taxes: NumberMaximum or minimum cost excluding taxes.
after_taxes: Option<Number>Maximum or minimum cost including taxes.
extensions: ExtensionsUndocumented JSON fields, preserved verbatim.
Implementations§
Source§impl PriceLimit
impl PriceLimit
Sourcepub fn before_taxes(amount: Number) -> Self
pub fn before_taxes(amount: Number) -> Self
A limit on the pre-tax amount only.
Trait Implementations§
Source§impl Clone for PriceLimit
impl Clone for PriceLimit
Source§fn clone(&self) -> PriceLimit
fn clone(&self) -> PriceLimit
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PriceLimit
impl Debug for PriceLimit
Source§impl<'de> Deserialize<'de> for PriceLimit
impl<'de> Deserialize<'de> for PriceLimit
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 JsonSchema for PriceLimit
impl JsonSchema for PriceLimit
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for PriceLimit
impl PartialEq for PriceLimit
Source§impl Serialize for PriceLimit
impl Serialize for PriceLimit
impl StructuralPartialEq for PriceLimit
Source§impl Validate for PriceLimit
impl Validate for PriceLimit
Auto Trait Implementations§
impl Freeze for PriceLimit
impl RefUnwindSafe for PriceLimit
impl Send for PriceLimit
impl Sync for PriceLimit
impl Unpin for PriceLimit
impl UnsafeUnpin for PriceLimit
impl UnwindSafe for PriceLimit
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