ocpp/v2_1/datatype/overstay_rule
OCPP 2.1 OverstayRule data type (schema OverstayRuleType).
to_json/decoder map to/from its OCPP-J JSON object; new (when
present) builds a value from the required fields only.
Types
Part of ISO 15118-20 price schedule.
| Field | Type | Req | Description |
|---|---|---|---|
custom_data | CustomData | — | |
overstay_fee | RationalNumber | ✓ | |
overstay_fee_period | Int | ✓ | Time till overstay will be reapplied |
overstay_rule_description | String | — | Human readable string to identify the overstay rule. (max 32 chars) |
start_time | Int | ✓ | Time in seconds after trigger of the parent Overstay Rules for this particular fee to apply. |
Schema: OverstayRuleType
pub type OverstayRule {
OverstayRule(
custom_data: option.Option(custom_data.CustomData),
overstay_fee: rational_number.RationalNumber,
overstay_fee_period: Int,
overstay_rule_description: option.Option(String),
start_time: Int,
)
}
Constructors
-
OverstayRule( custom_data: option.Option(custom_data.CustomData), overstay_fee: rational_number.RationalNumber, overstay_fee_period: Int, overstay_rule_description: option.Option(String), start_time: Int, )
Values
pub fn decoder() -> decode.Decoder(OverstayRule)
Decode a OverstayRule from its OCPP-J JSON object, enforcing schema constraints.
pub fn new(
overstay_fee overstay_fee: rational_number.RationalNumber,
overstay_fee_period overstay_fee_period: Int,
start_time start_time: Int,
) -> OverstayRule
Construct a OverstayRule from its required fields, with every optional field set to None.
pub fn to_json(value: OverstayRule) -> json.Json
Encode a OverstayRule to its OCPP-J JSON object.