TollFare
public struct TollFare : Hashable
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 in editions like the Navigate Edition. If you’re using the
RoutingEngine, this feature is considered to be stable.
-
The currency in which the toll is to be paid in ISO 4217 format, e.g. “USD”.
Declaration
Swift
public var currency: String -
The amount of the toll be paid.
Declaration
Swift
public var price: Double -
The list of accepted payment methods like cash and credit card.
Declaration
Swift
public var paymentMethods: [PaymentMethod] -
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
Declaration
Swift
public var timeRule: TimeRule? -
The list of available transponders
Declaration
Swift
public var transponders: [String] -
Creates a new instance.
Declaration
Swift
public init(currency: String, price: Double, paymentMethods: [PaymentMethod], timeRule: TimeRule? = nil, transponders: [String] = [])