OrderItem class

One of 6 variants, chosen by the "productType" property. Patched in by scripts/sdk.cjs: the generator flattens this union into its first variant, which cannot read the others.

Properties

airtime → AirtimeOrderItem?
The "airtime" variant, or null when the value is another one.
no setter
esim → EsimOrderItem?
The "esim" variant, or null when the value is another one.
no setter
flight → FlightOrderItem?
The "flight" variant, or null when the value is another one.
no setter
giftCard → GiftCardOrderItem?
The "giftCard" variant, or null when the value is another one.
no setter
hashCode → int
The hash code for this object.
no setteroverride
hotel → HotelOrderItem?
The "hotel" variant, or null when the value is another one.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
utility → UtilityOrderItem?
The "utility" variant, or null when the value is another one.
no setter
value → Object
The variant. Use the getters below, or a type check, to read it.
final

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) → OrderItem?
Returns a new OrderItem from a decoded JSON object, or null for something that is not an object. Throws a FormatException when no variant fits: skipping it would hide a purchase or a price.
listFromJson(dynamic json, {bool growable = false}) → List<OrderItem>
mapFromJson(dynamic json) → Map<String, OrderItem>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<OrderItem>>