EVChargingTariffElement
public struct EVChargingTariffElement : Hashable
Represents a tariff element, which defines how pricing is applied. The associated condition assists the client in selecting the appropriate element for a charging session. Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
-
List of price components that describe the tariff. Each of the components should have a different
EVChargingTariffDimension.Declaration
Swift
public var components: [EVChargingTariffPriceComponent] -
Condition that the charging session needs to meet to apply the tariff element. An element without any condition is typically present for charging sessions that do not meet any of the conditions.
For example, a tariff element with a lower price can be valid only during nighttime, while a generic tariff element without conditions applies for daytime charging sessions. The conditions are listed in priority order. I.e., when
EVChargingTariffElementCondition.dateis present, it should be matched first, followed byEVChargingTariffElementCondition.daysand so on.Declaration
Swift
public var condition: EVChargingTariffElementCondition? -
Creates a new instance.
Parameters
- components: List of price components that describe the tariff.
Each of the components should have a different
EVChargingTariffDimension. - condition: Condition that the charging session needs to meet to apply the tariff element. An element without any condition is typically present for charging sessions that do not meet any of the conditions.
For example, a tariff element with a lower price can be valid only during nighttime, while a generic tariff element without conditions applies for daytime charging sessions. The conditions are listed in priority order. I.e., when
EVChargingTariffElementCondition.dateis present, it should be matched first, followed byEVChargingTariffElementCondition.daysand so on.- components: List of price components that describe the tariff.
Each of the components should have a different
Declaration
Swift
public init(components: [EVChargingTariffPriceComponent] = [], condition: EVChargingTariffElementCondition? = nil)