pub struct PriceComponent {
pub component_type: TariffDimensionType,
pub price: Number,
pub step_size: u32,
pub extensions: Extensions,
}Available on crate feature
v2_1_1 only.Expand description
How consumption of one dimension translates into money owed, in OCPI 2.1.1.
There is no vat field. The price is always excluding VAT, and OCPI 2.1.1 provides no
way to say what the VAT is; that arrived in OCPI 2.2.
Spec: 2.1.1 §mod_tariffs_pricecomponent_class
Fields§
§component_type: TariffDimensionTypeThe dimension being priced.
price: NumberPrice per unit, excluding VAT.
step_size: u32Minimum amount to be billed: the dimension is billed in blocks of this size.
extensions: ExtensionsUndocumented JSON fields, preserved verbatim.
Implementations§
Source§impl PriceComponent
impl PriceComponent
Sourcepub fn new(component_type: TariffDimensionType, price: Number) -> Self
pub fn new(component_type: TariffDimensionType, price: Number) -> Self
A price component with a step_size of 1.
Trait Implementations§
Source§impl Clone for PriceComponent
impl Clone for PriceComponent
Source§fn clone(&self) -> PriceComponent
fn clone(&self) -> PriceComponent
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 PriceComponent
impl Debug for PriceComponent
Source§impl<'de> Deserialize<'de> for PriceComponent
impl<'de> Deserialize<'de> for PriceComponent
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 PriceComponent
impl JsonSchema for PriceComponent
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 PriceComponent
impl PartialEq for PriceComponent
Source§impl Serialize for PriceComponent
impl Serialize for PriceComponent
impl StructuralPartialEq for PriceComponent
Source§impl Validate for PriceComponent
impl Validate for PriceComponent
Auto Trait Implementations§
impl Freeze for PriceComponent
impl RefUnwindSafe for PriceComponent
impl Send for PriceComponent
impl Sync for PriceComponent
impl Unpin for PriceComponent
impl UnsafeUnpin for PriceComponent
impl UnwindSafe for PriceComponent
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