public abstract class CancellationFeePolicy extends Object implements Parcelable
Modifier and Type | Class and Description |
---|---|
static class |
CancellationFeePolicy.StatusLimit
From which ride status cancellation fee will apply.
|
static class |
CancellationFeePolicy.Type
Which type of cancellation fee applies
|
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
CancellationFeePolicy() |
Modifier and Type | Method and Description |
---|---|
static CancellationFeePolicy |
create(CancellationFeePolicy.Type type,
Integer allowedCancellationMinutesBeforeRideStarts,
CancellationFeePolicy.StatusLimit statusLimit,
Price cancellationFee)
Creates a new Cancellation fee policy
|
abstract Integer |
getAllowedCancellationMinutesBeforeRideStarts()
If
CancellationFeePolicy.getType() is CancellationFeePolicy.Type.TIME_LIMIT , this will contain
the time before the ride starts that the passenger may cancel the ride without any fee. |
abstract Price |
getCancellationFee()
The cancellation fee that will be charged if the ride is cancelled after the policy limit.
|
abstract CancellationFeePolicy.StatusLimit |
getStatusLimit()
From which ride status cancellation fee will apply.
|
abstract CancellationFeePolicy.Type |
getType()
The type of the cancellation fee
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
describeContents, writeToParcel
public abstract CancellationFeePolicy.Type getType()
public abstract Integer getAllowedCancellationMinutesBeforeRideStarts()
CancellationFeePolicy.getType()
is CancellationFeePolicy.Type.TIME_LIMIT
, this will contain
the time before the ride starts that the passenger may cancel the ride without any fee.
TODO: Understand from which status the time limit applies
If CancellationFeePolicy.getType()
is not CancellationFeePolicy.Type.TIME_LIMIT
, will be null
public abstract CancellationFeePolicy.StatusLimit getStatusLimit()
CancellationFeePolicy.getType()
is not CancellationFeePolicy.Type.STATUS_LIMIT
, will be null
public abstract Price getCancellationFee()
public static CancellationFeePolicy create(CancellationFeePolicy.Type type, Integer allowedCancellationMinutesBeforeRideStarts, CancellationFeePolicy.StatusLimit statusLimit, Price cancellationFee)