pub struct Component {
pub tariff_element_index: usize,
pub price: Decimal,
pub vat: VatApplicable,
pub step_size: u64,
}Expand description
A Price Component describes how a certain amount of a certain dimension being consumed translates into an amount of money owed.
Fields§
§tariff_element_index: usizeThe index of the tariff this Component lives in.
price: DecimalPrice per unit (excl. VAT) for this dimension.
vat: VatApplicableApplicable VAT percentage for this tariff dimension. If omitted, no VAT is applicable. Not providing a VAT is different from 0% VAT, which would be a value of 0.0 here.
step_size: u64Minimum amount to be billed. That is, the dimension will be billed in this step_size blocks.
Consumed amounts are rounded up to the smallest multiple of step_size that is greater than
the consumed amount.
For example: if type is TIME and step_size has a value of 300, then time will be billed in
blocks of 5 minutes. If 6 minutes were consumed, 10 minutes (2 blocks of step_size) will
be billed.