Class TollFare

java.lang.Object
com.here.sdk.routing.TollFare

public final class TollFare extends Object

This struct presents all the fare data for a toll.

Note: If you're using the OfflineRoutingEngine, be aware that this feature is currently in beta. As a result, there may be some bugs or unexpected behaviors. Additionally, this feature and related APIs may be updated in future releases without going through the deprecation process. Note that the OfflineRoutingEngine is only available for the Navigate license. If you're using the RoutingEngine, this feature is considered to be stable.

  • Field Details

    • currency

      @NonNull public String currency

      The currency in which the toll is to be paid in ISO 4217 format, e.g. "USD".

    • price

      public double price

      The amount of the toll be paid.

    • paymentMethods

      @NonNull public List<PaymentMethod> paymentMethods

      The list of accepted payment methods like cash and credit card.

    • timeRule

      @Nullable public TimeRule 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

      @NonNull public List<String> transponders

      The list of available transponders.

    • pass

      @Nullable public TollFarePass pass

      Specifies whether this TollFare is a multi-travel pass, and its characteristics.

  • Constructor Details

    • TollFare

      public TollFare(@NonNull String currency, double price, @NonNull List<PaymentMethod> paymentMethods)

      Creates a new instance.

      Parameters:
      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.

    • TollFare

      public TollFare(@NonNull String currency, double price, @NonNull List<PaymentMethod> paymentMethods, @Nullable TimeRule timeRule)

      Creates a new instance.

      Parameters:
      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

    • TollFare

      public TollFare(@NonNull String currency, double price, @NonNull List<PaymentMethod> paymentMethods, @Nullable TimeRule timeRule, @NonNull List<String> transponders)

      Creates a new instance.

      Parameters:
      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.

    • TollFare

      public TollFare(@NonNull String currency, double price, @NonNull List<PaymentMethod> paymentMethods, @Nullable TimeRule timeRule, @NonNull List<String> transponders, @Nullable TollFarePass pass)

      Creates a new instance.

      Parameters:
      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.

  • Method Details