IssuingTransactionPurchaseDetailsFlight.fromJson constructor
IssuingTransactionPurchaseDetailsFlight.fromJson(
- Object? json
Implementation
factory IssuingTransactionPurchaseDetailsFlight.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return IssuingTransactionPurchaseDetailsFlight(
departureAt: map['departure_at'] == null
? null
: (map['departure_at'] as num).toInt(),
passengerName: map['passenger_name'] == null
? null
: (map['passenger_name'] as String),
refundable:
map['refundable'] == null ? null : (map['refundable'] as bool),
segments: map['segments'] == null
? null
: (map['segments'] as List<Object?>)
.map((el) => IssuingTransactionFlightDataLeg.fromJson(el))
.toList(),
travelAgency: map['travel_agency'] == null
? null
: (map['travel_agency'] as String),
);
}