PassengerInput class

Constructors

PassengerInput({required int passengerIndex, required String givenName, required String familyName, String? title, String? gender, DateTime? bornOn, String? email, String? phoneNumber, List<SelectedSeatInput> selectedSeats = const [], List<IdentityDocumentInput> identityDocuments = const []})
Returns a new PassengerInput instance.

Properties

bornOn ↔ DateTime?
Date of birth (yyyy-MM-dd).
getter/setter pair
email ↔ String?
Passenger's email address.
getter/setter pair
familyName ↔ String
Last name, as on the travel document.
getter/setter pair
gender ↔ String?
Gender as on the travel document, for example m or f.
getter/setter pair
givenName ↔ String
First name, as on the travel document.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
identityDocuments ↔ List<IdentityDocumentInput>
The passenger's travel document, at most one. Required for every passenger when the offer's identityDocumentsRequired is true, and then the airline needs a passport; its type must be one of the offer's supportedDocumentTypes.
getter/setter pair
passengerIndex ↔ int
1-based position in the fare's details.offerPassengers.
getter/setter pair
phoneNumber ↔ String?
Passenger's phone number in international format, for example +442080160509.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedSeats ↔ List<SelectedSeatInput>
Seats from the seat map, at most one per segment.
getter/setter pair
title ↔ String?
Title, for example mr, mrs or ms.
getter/setter pair

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

Constants

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