pub struct PriceComponentBuilder<S: State = Empty> { /* private fields */ }Available on crate feature
v2_3_0 only.Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> PriceComponentBuilder<S>
impl<S: State> PriceComponentBuilder<S>
Sourcepub fn build(self) -> PriceComponentwhere
S: IsComplete,
pub fn build(self) -> PriceComponentwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn component_type(
self,
value: impl Into<TariffDimensionType>,
) -> PriceComponentBuilder<SetComponentType<S>>where
S::ComponentType: IsUnset,
pub fn component_type(
self,
value: impl Into<TariffDimensionType>,
) -> PriceComponentBuilder<SetComponentType<S>>where
S::ComponentType: IsUnset,
Required.
The dimension that is being priced.
Sourcepub fn price(
self,
value: impl Into<Number>,
) -> PriceComponentBuilder<SetPrice<S>>where
S::Price: IsUnset,
pub fn price(
self,
value: impl Into<Number>,
) -> PriceComponentBuilder<SetPrice<S>>where
S::Price: IsUnset,
Required.
Price per unit for this dimension, including or excluding taxes according to the
containing Tariff’s tax_included field.
Sourcepub fn vat(self, value: impl Into<Number>) -> PriceComponentBuilder<SetVat<S>>where
S::Vat: IsUnset,
pub fn vat(self, value: impl Into<Number>) -> PriceComponentBuilder<SetVat<S>>where
S::Vat: IsUnset,
Sourcepub fn maybe_vat(
self,
value: Option<impl Into<Number>>,
) -> PriceComponentBuilder<SetVat<S>>where
S::Vat: IsUnset,
pub fn maybe_vat(
self,
value: Option<impl Into<Number>>,
) -> PriceComponentBuilder<SetVat<S>>where
S::Vat: IsUnset,
Sourcepub fn step_size(
self,
value: impl Into<u32>,
) -> PriceComponentBuilder<SetStepSize<S>>where
S::StepSize: IsUnset,
pub fn step_size(
self,
value: impl Into<u32>,
) -> PriceComponentBuilder<SetStepSize<S>>where
S::StepSize: IsUnset,
Required.
Minimum amount to be billed: the dimension is billed in blocks of this size.
NOTE: The
step_sizefield is no longer present in OCPI 3.0. … Users of OCPI 2.2.1 looking to be ready for a transition to OCPI 3.0 … are advised to effectively avoid usingstep_sizeby settingstep_sizeto 1 always.
The unit is the dimension’s step_size multiplier: 1 Wh for ENERGY, 1 second for the
time dimensions, and nothing for FLAT. See TariffDimensionType::step_size_unit.
Sourcepub fn extensions(
self,
value: impl Into<Extensions>,
) -> PriceComponentBuilder<SetExtensions<S>>where
S::Extensions: IsUnset,
pub fn extensions(
self,
value: impl Into<Extensions>,
) -> PriceComponentBuilder<SetExtensions<S>>where
S::Extensions: IsUnset,
Sourcepub fn maybe_extensions(
self,
value: Option<impl Into<Extensions>>,
) -> PriceComponentBuilder<SetExtensions<S>>where
S::Extensions: IsUnset,
pub fn maybe_extensions(
self,
value: Option<impl Into<Extensions>>,
) -> PriceComponentBuilder<SetExtensions<S>>where
S::Extensions: IsUnset,
Auto Trait Implementations§
impl<S> Freeze for PriceComponentBuilder<S>
impl<S> RefUnwindSafe for PriceComponentBuilder<S>
impl<S> Send for PriceComponentBuilder<S>
impl<S> Sync for PriceComponentBuilder<S>
impl<S> Unpin for PriceComponentBuilder<S>
impl<S> UnsafeUnpin for PriceComponentBuilder<S>
impl<S> UnwindSafe for PriceComponentBuilder<S>
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