#[non_exhaustive]pub enum PricingNoteCode {
NoPriceComponent,
PeriodSpansPriceChange,
PeriodsOutOfOrder,
TotalClamped,
NegativeTax,
UnattributedTax,
}tariffs only.Expand description
What a PricingNote is about, without reading the English.
An invoice-reconciliation pipeline has to be able to count these — how many CDRs this month span a price change? — and grepping a sentence is not a way to do that.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoPriceComponent
A dimension was consumed that no Tariff Element prices.
Not an error: “there will be no costs for that Tariff Dimension”. But a session that charged 40 kWh for nothing is worth looking at.
PeriodSpansPriceChange
A Charging Period outlasted the Price Component that priced it.
A CPO SHALL at least start (and add) a ChargingPeriod every moment/event that has relevance for the total costs of a CDR. … When an energy changes in price after 17:00, the CPO has to start a new Charging Period at 17:00.
So this is a defect in the CDR, not in the tariff: the period should have been split.
Its quantities cannot be apportioned after the fact — nothing in the data says how much
of the energy fell either side of the boundary — so the period is priced at the rate that
applied when it began, and this note says that happened. See
PricingEngine.
PeriodsOutOfOrder
The Charging Periods are not in chronological order.
Nothing in the property tables says they must be, but everything built on them assumes it:
step_size is defined in terms of “the last relevant PriceComponent”, and a period’s
duration is only knowable as the gap to the next one. Out of order, both are wrong.
The session is still priced — the quantities are all there — but any restriction that depends on elapsed time is evaluated against a timeline that does not exist.
TotalClamped
A min_price or max_price moved the total, and the tax lines were moved with it.
NegativeTax
The tax the tariff describes came out negative.
No tariff can mean that: a VAT percentage below zero is a malformed
PriceComponent, which
Validate reports. The engine does not require validated input,
so rather than publish a session that costs less with tax than without, it holds the
inclusive total at the exclusive one and says why.
UnattributedTax
Tax was owed that no rate in the session accounts for.
Raised when a min_price.after_taxes lifts the inclusive total of a session whose price
components named no VAT at all. The amount is real; the rate is not knowable.
Implementations§
Trait Implementations§
Source§impl Clone for PricingNoteCode
impl Clone for PricingNoteCode
Source§fn clone(&self) -> PricingNoteCode
fn clone(&self) -> PricingNoteCode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PricingNoteCode
Source§impl Debug for PricingNoteCode
impl Debug for PricingNoteCode
Source§impl<'de> Deserialize<'de> for PricingNoteCode
impl<'de> Deserialize<'de> for PricingNoteCode
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>,
Source§impl Display for PricingNoteCode
impl Display for PricingNoteCode
impl Eq for PricingNoteCode
Source§impl Hash for PricingNoteCode
impl Hash for PricingNoteCode
Source§impl PartialEq for PricingNoteCode
impl PartialEq for PricingNoteCode
Source§impl Serialize for PricingNoteCode
impl Serialize for PricingNoteCode
impl StructuralPartialEq for PricingNoteCode
Auto Trait Implementations§
impl Freeze for PricingNoteCode
impl RefUnwindSafe for PricingNoteCode
impl Send for PricingNoteCode
impl Sync for PricingNoteCode
impl Unpin for PricingNoteCode
impl UnsafeUnpin for PricingNoteCode
impl UnwindSafe for PricingNoteCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.