pub struct TariffBuilder<S: State = Empty> { /* private fields */ }Available on crate feature
v2_2_1 only.Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> TariffBuilder<S>
impl<S: State> TariffBuilder<S>
Sourcepub fn build(self) -> Tariffwhere
S: IsComplete,
pub fn build(self) -> Tariffwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn country_code(
self,
value: impl Into<CountryCode>,
) -> TariffBuilder<SetCountryCode<S>>where
S::CountryCode: IsUnset,
pub fn country_code(
self,
value: impl Into<CountryCode>,
) -> TariffBuilder<SetCountryCode<S>>where
S::CountryCode: IsUnset,
Required.
ISO-3166 alpha-2 country code of the CPO that owns this Tariff.
Sourcepub fn party_id(self, value: impl Into<PartyId>) -> TariffBuilder<SetPartyId<S>>where
S::PartyId: IsUnset,
pub fn party_id(self, value: impl Into<PartyId>) -> TariffBuilder<SetPartyId<S>>where
S::PartyId: IsUnset,
Required.
ID of the CPO that ‘owns’ this Tariff.
Sourcepub fn id(self, value: impl Into<CiString<36>>) -> TariffBuilder<SetId<S>>where
S::Id: IsUnset,
pub fn id(self, value: impl Into<CiString<36>>) -> TariffBuilder<SetId<S>>where
S::Id: IsUnset,
Required.
Uniquely identifies the tariff within the CPO’s platform.
Sourcepub fn currency(
self,
value: impl Into<Currency>,
) -> TariffBuilder<SetCurrency<S>>where
S::Currency: IsUnset,
pub fn currency(
self,
value: impl Into<Currency>,
) -> TariffBuilder<SetCurrency<S>>where
S::Currency: IsUnset,
Required.
ISO-4217 code of the currency of this tariff.
Sourcepub fn tariff_type(
self,
value: impl Into<TariffType>,
) -> TariffBuilder<SetTariffType<S>>where
S::TariffType: IsUnset,
pub fn tariff_type(
self,
value: impl Into<TariffType>,
) -> TariffBuilder<SetTariffType<S>>where
S::TariffType: IsUnset,
Sourcepub fn maybe_tariff_type(
self,
value: Option<impl Into<TariffType>>,
) -> TariffBuilder<SetTariffType<S>>where
S::TariffType: IsUnset,
pub fn maybe_tariff_type(
self,
value: Option<impl Into<TariffType>>,
) -> TariffBuilder<SetTariffType<S>>where
S::TariffType: IsUnset,
Sourcepub fn tariff_alt_text(
self,
value: impl Into<Vec<DisplayText>>,
) -> TariffBuilder<SetTariffAltText<S>>where
S::TariffAltText: IsUnset,
pub fn tariff_alt_text(
self,
value: impl Into<Vec<DisplayText>>,
) -> TariffBuilder<SetTariffAltText<S>>where
S::TariffAltText: IsUnset,
Sourcepub fn maybe_tariff_alt_text(
self,
value: Option<impl Into<Vec<DisplayText>>>,
) -> TariffBuilder<SetTariffAltText<S>>where
S::TariffAltText: IsUnset,
pub fn maybe_tariff_alt_text(
self,
value: Option<impl Into<Vec<DisplayText>>>,
) -> TariffBuilder<SetTariffAltText<S>>where
S::TariffAltText: IsUnset,
Sourcepub fn tariff_alt_url(
self,
value: impl Into<Url>,
) -> TariffBuilder<SetTariffAltUrl<S>>where
S::TariffAltUrl: IsUnset,
pub fn tariff_alt_url(
self,
value: impl Into<Url>,
) -> TariffBuilder<SetTariffAltUrl<S>>where
S::TariffAltUrl: IsUnset,
Sourcepub fn maybe_tariff_alt_url(
self,
value: Option<impl Into<Url>>,
) -> TariffBuilder<SetTariffAltUrl<S>>where
S::TariffAltUrl: IsUnset,
pub fn maybe_tariff_alt_url(
self,
value: Option<impl Into<Url>>,
) -> TariffBuilder<SetTariffAltUrl<S>>where
S::TariffAltUrl: IsUnset,
Sourcepub fn min_price(self, value: impl Into<Price>) -> TariffBuilder<SetMinPrice<S>>where
S::MinPrice: IsUnset,
pub fn min_price(self, value: impl Into<Price>) -> TariffBuilder<SetMinPrice<S>>where
S::MinPrice: IsUnset,
Sourcepub fn maybe_min_price(
self,
value: Option<impl Into<Price>>,
) -> TariffBuilder<SetMinPrice<S>>where
S::MinPrice: IsUnset,
pub fn maybe_min_price(
self,
value: Option<impl Into<Price>>,
) -> TariffBuilder<SetMinPrice<S>>where
S::MinPrice: IsUnset,
Sourcepub fn max_price(self, value: impl Into<Price>) -> TariffBuilder<SetMaxPrice<S>>where
S::MaxPrice: IsUnset,
pub fn max_price(self, value: impl Into<Price>) -> TariffBuilder<SetMaxPrice<S>>where
S::MaxPrice: IsUnset,
Sourcepub fn maybe_max_price(
self,
value: Option<impl Into<Price>>,
) -> TariffBuilder<SetMaxPrice<S>>where
S::MaxPrice: IsUnset,
pub fn maybe_max_price(
self,
value: Option<impl Into<Price>>,
) -> TariffBuilder<SetMaxPrice<S>>where
S::MaxPrice: IsUnset,
Sourcepub fn elements(
self,
value: impl Into<Vec<TariffElement>>,
) -> TariffBuilder<SetElements<S>>where
S::Elements: IsUnset,
pub fn elements(
self,
value: impl Into<Vec<TariffElement>>,
) -> TariffBuilder<SetElements<S>>where
S::Elements: IsUnset,
Required.
The Tariff Elements. Cardinality +.
Sourcepub fn start_date_time(
self,
value: impl Into<DateTime>,
) -> TariffBuilder<SetStartDateTime<S>>where
S::StartDateTime: IsUnset,
pub fn start_date_time(
self,
value: impl Into<DateTime>,
) -> TariffBuilder<SetStartDateTime<S>>where
S::StartDateTime: IsUnset,
Sourcepub fn maybe_start_date_time(
self,
value: Option<impl Into<DateTime>>,
) -> TariffBuilder<SetStartDateTime<S>>where
S::StartDateTime: IsUnset,
pub fn maybe_start_date_time(
self,
value: Option<impl Into<DateTime>>,
) -> TariffBuilder<SetStartDateTime<S>>where
S::StartDateTime: IsUnset,
Sourcepub fn end_date_time(
self,
value: impl Into<DateTime>,
) -> TariffBuilder<SetEndDateTime<S>>where
S::EndDateTime: IsUnset,
pub fn end_date_time(
self,
value: impl Into<DateTime>,
) -> TariffBuilder<SetEndDateTime<S>>where
S::EndDateTime: IsUnset,
Sourcepub fn maybe_end_date_time(
self,
value: Option<impl Into<DateTime>>,
) -> TariffBuilder<SetEndDateTime<S>>where
S::EndDateTime: IsUnset,
pub fn maybe_end_date_time(
self,
value: Option<impl Into<DateTime>>,
) -> TariffBuilder<SetEndDateTime<S>>where
S::EndDateTime: IsUnset,
Sourcepub fn energy_mix(
self,
value: impl Into<EnergyMix>,
) -> TariffBuilder<SetEnergyMix<S>>where
S::EnergyMix: IsUnset,
pub fn energy_mix(
self,
value: impl Into<EnergyMix>,
) -> TariffBuilder<SetEnergyMix<S>>where
S::EnergyMix: IsUnset,
Sourcepub fn maybe_energy_mix(
self,
value: Option<impl Into<EnergyMix>>,
) -> TariffBuilder<SetEnergyMix<S>>where
S::EnergyMix: IsUnset,
pub fn maybe_energy_mix(
self,
value: Option<impl Into<EnergyMix>>,
) -> TariffBuilder<SetEnergyMix<S>>where
S::EnergyMix: IsUnset,
Sourcepub fn last_updated(
self,
value: impl Into<DateTime>,
) -> TariffBuilder<SetLastUpdated<S>>where
S::LastUpdated: IsUnset,
pub fn last_updated(
self,
value: impl Into<DateTime>,
) -> TariffBuilder<SetLastUpdated<S>>where
S::LastUpdated: IsUnset,
Required.
Timestamp when this Tariff was last updated (or created).
Sourcepub fn extensions(
self,
value: impl Into<Extensions>,
) -> TariffBuilder<SetExtensions<S>>where
S::Extensions: IsUnset,
pub fn extensions(
self,
value: impl Into<Extensions>,
) -> TariffBuilder<SetExtensions<S>>where
S::Extensions: IsUnset,
Sourcepub fn maybe_extensions(
self,
value: Option<impl Into<Extensions>>,
) -> TariffBuilder<SetExtensions<S>>where
S::Extensions: IsUnset,
pub fn maybe_extensions(
self,
value: Option<impl Into<Extensions>>,
) -> TariffBuilder<SetExtensions<S>>where
S::Extensions: IsUnset,
Auto Trait Implementations§
impl<S> Freeze for TariffBuilder<S>
impl<S> RefUnwindSafe for TariffBuilder<S>
impl<S> Send for TariffBuilder<S>
impl<S> Sync for TariffBuilder<S>
impl<S> Unpin for TariffBuilder<S>
impl<S> UnsafeUnpin for TariffBuilder<S>
impl<S> UnwindSafe for TariffBuilder<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