Pricing
Module to calculate pricing of divvy trips.
AdditiveRate
Bases: Rate
A combination of two classes with addition.
Source code in lyft_bikes/pricing.py
MinuteRate
dataclass
Bases: Rate
Amount in cents per minute starting at start
minute.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
amount |
int
|
the cost in cents per minute |
required |
start |
int
|
the minute where that cost starts |
required |
Example
Rides that cost 15 cents per minute after 30 minutes of riding.
Source code in lyft_bikes/pricing.py
Rate
All pricing will derive from this class.