ocpp/v2_1/datatype/tariff_time

OCPP 2.1 TariffTime data type (schema TariffTimeType).

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

Types

Price elements and tax for time

FieldTypeReqDescription
custom_dataCustomData
pricesList(TariffTimePrice)
tax_ratesList(TaxRate)

Schema: TariffTimeType

pub type TariffTime {
  TariffTime(
    custom_data: option.Option(custom_data.CustomData),
    prices: List(tariff_time_price.TariffTimePrice),
    tax_rates: option.Option(List(tax_rate.TaxRate)),
  )
}

Constructors

Values

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

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

pub fn new(
  prices prices: List(tariff_time_price.TariffTimePrice),
) -> TariffTime

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

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

Encode a TariffTime to its OCPP-J JSON object.

Search Document