ocpp/v2_1/datatype/tariff_fixed

OCPP 2.1 TariffFixed data type (schema TariffFixedType).

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

Types

FieldTypeReqDescription
custom_dataCustomData
pricesList(TariffFixedPrice)
tax_ratesList(TaxRate)

Schema: TariffFixedType

pub type TariffFixed {
  TariffFixed(
    custom_data: option.Option(custom_data.CustomData),
    prices: List(tariff_fixed_price.TariffFixedPrice),
    tax_rates: option.Option(List(tax_rate.TaxRate)),
  )
}

Constructors

Values

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

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

pub fn new(
  prices prices: List(tariff_fixed_price.TariffFixedPrice),
) -> TariffFixed

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

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

Encode a TariffFixed to its OCPP-J JSON object.

Search Document