TollFare constructor

TollFare(
  1. String currency,
  2. double price,
  3. List<PaymentMethod> paymentMethods, [
  4. TimeRule? timeRule = null,
  5. List<String> transponders = const [],
  6. TollFarePass? pass = null,
])

Creates a new instance.

  • currency The currency in which the toll is to be paid in ISO 4217 format, e.g. "USD".
  • price The amount of the toll be paid.
  • paymentMethods The list of accepted payment methods like cash and credit card.
  • timeRule The time domain when this fare is valid. If this field is missing, it means the fare is always valid. For a detailed description of the Time Domain specification and usage in routing services, please refer to the documentation available in the Time Domain
  • transponders The list of available transponders.
  • pass Specifies whether this TollFare is a multi-travel pass, and its characteristics.

Implementation

TollFare(String currency, double price, List<PaymentMethod> paymentMethods, [TimeRule? timeRule = null, List<String> transponders = const [], TollFarePass? pass = null])
  : currency = currency, price = price, paymentMethods = paymentMethods, timeRule = timeRule, transponders = transponders, pass = pass ?? null;