ocpp/v2_1/datatype/absolute_price_schedule
OCPP 2.1 AbsolutePriceSchedule data type (schema AbsolutePriceScheduleType).
to_json/decoder map to/from its OCPP-J JSON object; new (when
present) builds a value from the required fields only.
Types
The AbsolutePriceScheduleType is modeled after the same type that is defined in ISO 15118-20, such that if it is supplied by an EMSP as a signed EXI message, the conversion from EXI to JSON (in OCPP) and back to EXI (for ISO 15118-20) does not change the digest and therefore does not invalidate the signature.
| Field | Type | Req | Description |
|---|---|---|---|
additional_selected_services | List(AdditionalSelectedServices) | — | |
currency | String | ✓ | Currency according to ISO 4217. (max 3 chars) |
custom_data | CustomData | — | |
language | String | ✓ | String that indicates what language is used for the human readable strings in the price schedule. Based on ISO 639. (max 8 chars) |
maximum_cost | RationalNumber | — | |
minimum_cost | RationalNumber | — | |
overstay_rule_list | OverstayRuleList | — | |
price_algorithm | String | ✓ | A string in URN notation which shall uniquely identify an algorithm that defines how to compute an energy fee sum for a specific power profile based on the EnergyFee information from the PriceRule elements. (max 2000 chars) |
price_rule_stacks | List(PriceRuleStack) | ✓ | |
price_schedule_description | String | — | Description of the price schedule. (max 160 chars) |
price_schedule_id | Int | ✓ | Unique ID of price schedule (≥ 0) |
tax_rules | List(TaxRule) | — | |
time_anchor | DateTime | ✓ | Starting point of price schedule. |
Schema: AbsolutePriceScheduleType
pub type AbsolutePriceSchedule {
AbsolutePriceSchedule(
additional_selected_services: option.Option(
List(
additional_selected_services.AdditionalSelectedServices,
),
),
currency: String,
custom_data: option.Option(custom_data.CustomData),
language: String,
maximum_cost: option.Option(rational_number.RationalNumber),
minimum_cost: option.Option(rational_number.RationalNumber),
overstay_rule_list: option.Option(
overstay_rule_list.OverstayRuleList,
),
price_algorithm: String,
price_rule_stacks: List(price_rule_stack.PriceRuleStack),
price_schedule_description: option.Option(String),
price_schedule_id: Int,
tax_rules: option.Option(List(tax_rule.TaxRule)),
time_anchor: timestamp.Timestamp,
)
}
Constructors
-
AbsolutePriceSchedule( additional_selected_services: option.Option( List(additional_selected_services.AdditionalSelectedServices), ), currency: String, custom_data: option.Option(custom_data.CustomData), language: String, maximum_cost: option.Option(rational_number.RationalNumber), minimum_cost: option.Option(rational_number.RationalNumber), overstay_rule_list: option.Option( overstay_rule_list.OverstayRuleList, ), price_algorithm: String, price_rule_stacks: List(price_rule_stack.PriceRuleStack), price_schedule_description: option.Option(String), price_schedule_id: Int, tax_rules: option.Option(List(tax_rule.TaxRule)), time_anchor: timestamp.Timestamp, )
Values
pub fn decoder() -> decode.Decoder(AbsolutePriceSchedule)
Decode a AbsolutePriceSchedule from its OCPP-J JSON object, enforcing schema constraints.
pub fn new(
currency currency: String,
language language: String,
price_algorithm price_algorithm: String,
price_rule_stacks price_rule_stacks: List(
price_rule_stack.PriceRuleStack,
),
price_schedule_id price_schedule_id: Int,
time_anchor time_anchor: timestamp.Timestamp,
) -> AbsolutePriceSchedule
Construct a AbsolutePriceSchedule from its required fields, with every optional field set to None.
pub fn to_json(value: AbsolutePriceSchedule) -> json.Json
Encode a AbsolutePriceSchedule to its OCPP-J JSON object.