FarePrice
public struct FarePrice : Hashable
Price of a fare.
-
Type of price represented by this object. Defaults to
FarePriceType.value.Declaration
Swift
public var type: FarePriceType -
Truewhen the fare price is estimated based on best guess and the actual price may differ. Defaults tofalse.Declaration
Swift
public var estimated: Bool -
Local currency of the price compliant to ISO 4217. For example, “GBP” for the British pound sterling. Defaults to “EUR” string.
Declaration
Swift
public var currency: String -
Minimum price when the price is of
FarePriceType.rangetype. Otherwise, it is equal toFarePrice.maximum. Defaults to 0.Declaration
Swift
public var minimum: Double -
Maximum price when the price is of
FarePriceType.rangetype. Otherwise, it is equal toFarePrice.minimum. Defaults to 0.Declaration
Swift
public var maximum: Double -
When set, the price is paid for a specific duration.
Examples:
3600 seconds - price for one hour
28800 seconds - price for eight hours
86400 seconds - price for one day
Note: When the ticket validity period starts depends on the
Agencyproviding the service. Defaults tonil.Declaration
Swift
public var validityPeriod: TimeInterval? -
Creates a new instance.
Parameters
- type: Type of price represented by this object.
Defaults to
FarePriceType.value. - estimated:
Truewhen the fare price is estimated based on best guess and the actual price may differ. Defaults tofalse. - currency: Local currency of the price compliant to ISO 4217. For example, “GBP” for the British pound sterling. Defaults to “EUR” string.
- minimum: Minimum price when the price is of
FarePriceType.rangetype. Otherwise, it is equal toFarePrice.maximum. Defaults to 0. - maximum: Maximum price when the price is of
FarePriceType.rangetype. Otherwise, it is equal toFarePrice.minimum. Defaults to 0. - validityPeriod: When set, the price is paid for a specific duration.
Examples:
3600 seconds - price for one hour
28800 seconds - price for eight hours
86400 seconds - price for one day
Note: When the ticket validity period starts depends on the
Agencyproviding the service. Defaults tonil.- type: Type of price represented by this object.
Defaults to
Declaration
Swift
public init(type: FarePriceType = FarePriceType.value, estimated: Bool = false, currency: String = "EUR", minimum: Double = 0.0, maximum: Double = 0.0, validityPeriod: TimeInterval? = nil)