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.

FieldTypeReqDescription
custom_dataCustomData
overstay_feeRationalNumber
overstay_fee_periodIntTime till overstay will be reapplied
overstay_rule_descriptionStringHuman readable string to identify the overstay rule. (max 32 chars)
start_timeIntTime 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

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.

Search Document