Class Passenger


  • public class Passenger
    extends Object
    Passenger
    • Constructor Detail

      • Passenger

        public Passenger()
    • Method Detail

      • dateOfBirth

        public Passenger dateOfBirth​(LocalDate dateOfBirth)
        The passenger's date of birth. * Format `yyyy-MM-dd` * minLength: 10 * maxLength: 10
        Parameters:
        dateOfBirth - The passenger's date of birth. * Format `yyyy-MM-dd` * minLength: 10 * maxLength: 10
        Returns:
        the current Passenger instance, allowing for method chaining
      • getDateOfBirth

        public LocalDate getDateOfBirth()
        The passenger's date of birth. * Format `yyyy-MM-dd` * minLength: 10 * maxLength: 10
        Returns:
        dateOfBirth The passenger's date of birth. * Format `yyyy-MM-dd` * minLength: 10 * maxLength: 10
      • setDateOfBirth

        public void setDateOfBirth​(LocalDate dateOfBirth)
        The passenger's date of birth. * Format `yyyy-MM-dd` * minLength: 10 * maxLength: 10
        Parameters:
        dateOfBirth - The passenger's date of birth. * Format `yyyy-MM-dd` * minLength: 10 * maxLength: 10
      • firstName

        public Passenger firstName​(String firstName)
        The passenger's first name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII
        Parameters:
        firstName - The passenger's first name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII
        Returns:
        the current Passenger instance, allowing for method chaining
      • getFirstName

        public String getFirstName()
        The passenger's first name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII
        Returns:
        firstName The passenger's first name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII
      • setFirstName

        public void setFirstName​(String firstName)
        The passenger's first name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII
        Parameters:
        firstName - The passenger's first name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII
      • lastName

        public Passenger lastName​(String lastName)
        The passenger's last name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII
        Parameters:
        lastName - The passenger's last name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII
        Returns:
        the current Passenger instance, allowing for method chaining
      • getLastName

        public String getLastName()
        The passenger's last name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII
        Returns:
        lastName The passenger's last name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII
      • setLastName

        public void setLastName​(String lastName)
        The passenger's last name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII
        Parameters:
        lastName - The passenger's last name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII
      • phoneNumber

        public Passenger phoneNumber​(String phoneNumber)
        The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters
        Parameters:
        phoneNumber - The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters
        Returns:
        the current Passenger instance, allowing for method chaining
      • getPhoneNumber

        public String getPhoneNumber()
        The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters
        Returns:
        phoneNumber The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters
      • setPhoneNumber

        public void setPhoneNumber​(String phoneNumber)
        The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters
        Parameters:
        phoneNumber - The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters
      • travellerType

        public Passenger travellerType​(String travellerType)
        The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters
        Parameters:
        travellerType - The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters
        Returns:
        the current Passenger instance, allowing for method chaining
      • getTravellerType

        public String getTravellerType()
        The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters
        Returns:
        travellerType The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters
      • setTravellerType

        public void setTravellerType​(String travellerType)
        The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters
        Parameters:
        travellerType - The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters
      • equals

        public boolean equals​(Object o)
        Return true if this Passenger object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • fromJson

        public static Passenger fromJson​(String jsonString)
                                  throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of Passenger given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of Passenger
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to Passenger
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of Passenger to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException