OrderItemCancellationPreview class

Constructors

OrderItemCancellationPreview({required Money penaltyAmount, Money? cancellationFee, required Money refundAmount, required bool isRefundable, List<CancellationPenalty>? appliedPenalties = const [], DateTime? effectiveCancellationDate, DateTime? checkInDate})
Returns a new OrderItemCancellationPreview instance.

Properties

appliedPenalties ↔ List<CancellationPenalty>?
The cancellation band in effect now, priced at penaltyAmount: at most one entry. Empty when the item's bands have not started yet; null when it states none.
getter/setter pair
cancellationFee ↔ Money?
A cancellation fee taken in addition to the penalty, in the order currency; null when none applies. It comes out of what the penalty leaves, so it never makes the refund negative.
getter/setter pair
checkInDate ↔ DateTime?
The check-in date of the booked stay.
getter/setter pair
effectiveCancellationDate ↔ DateTime?
The cancellation time the preview is calculated for (UTC).
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
isRefundable ↔ bool
Whether anything would be refunded; false is not an error.
getter/setter pair
penaltyAmount ↔ Money
The penalty that would be kept, in the order currency.
getter/setter pair
refundAmount ↔ Money
The amount that would be refunded, in the order currency: what was paid less the penalty and the cancellation fee.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → OrderItemCancellationPreview?
Returns a new OrderItemCancellationPreview instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<OrderItemCancellationPreview>
mapFromJson(dynamic json) → Map<String, OrderItemCancellationPreview>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<OrderItemCancellationPreview>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.