RepeatableDuration

data class RepeatableDuration(val duration: Duration, val repeated: Boolean)

Explicit duration information for a parking price.

Parameters

duration

Parking Duration used for price calculation.

repeated

Indicates if the duration can be used to extend the total parking time no matter what the repeated values of the other durations are. If repeated is false, the duration can only be used to extend the ticket if all of the other durations also have a repeated value of false. If any of the repeated values received in the response is true, then no durations with false values can be used additively in the final parking ticket. Note that even if the durations can be used additively, they cannot be used to add up to more than the next-higher duration with a repeated value of false. This allows parking providers to set fixed tiers (such as for an hour or a day), while still permitting drivers to add up smaller units of time (such as 10 minutes) that fall short of a fixed tier. For example, if a parking provider has a 10-minute duration where repeated is true, and 1-hour and 1-day durations where repeated is false, drivers can add up 5 x 10-minute durations (50 minutes). They cannot add up 6 x 10-minute durations, because then they should purchase a 1-hour ticket. They also can't purchase a 2-hour ticket. If they want to park for more than an hour, they are required to buy a 1-day ticket. However, a parking provider that sets all of its duration values to false allows drivers to combine them as desired, because there are no fixed tiers that the driver must work within.

Constructors

Link copied to clipboard
fun RepeatableDuration(duration: Duration, repeated: Boolean)

Properties

Link copied to clipboard
Link copied to clipboard