ocpp/v2_1/datatype/tariff_fixed_price

OCPP 2.1 TariffFixedPrice data type (schema TariffFixedPriceType).

to_json/decoder map to/from its OCPP-J JSON object; new (when present) builds a value from the required fields only.

Types

Tariff with optional conditions for a fixed price.

FieldTypeReqDescription
conditionsTariffConditionsFixed
custom_dataCustomData
price_fixedFloatFixed price for this element e.g. a start fee.

Schema: TariffFixedPriceType

pub type TariffFixedPrice {
  TariffFixedPrice(
    conditions: option.Option(
      tariff_conditions_fixed.TariffConditionsFixed,
    ),
    custom_data: option.Option(custom_data.CustomData),
    price_fixed: Float,
  )
}

Constructors

Values

pub fn decoder() -> decode.Decoder(TariffFixedPrice)

Decode a TariffFixedPrice from its OCPP-J JSON object, enforcing schema constraints.

pub fn new(price_fixed price_fixed: Float) -> TariffFixedPrice

Construct a TariffFixedPrice from its required fields, with every optional field set to None.

pub fn to_json(value: TariffFixedPrice) -> json.Json

Encode a TariffFixedPrice to its OCPP-J JSON object.

Search Document