Segment

public final class Segment

Container of information about each flight offer (Less information shown if the offer is and opaque flight offer) Flights (the complete journey to your final destination by air) are made up of: Segments (the trip from one stopping place to another) are made up of: Legs (take off at one airport and land at another)

Parameters

segmentId

Unique identifier for a single flight segment. Shown in case of opaque flight offer as well. Can be alphanumeric or numeric.

departureArrivalDayDifference

This is an indicator (can have values of -1, 0, 1, 2, etc.) which depends on the relative difference between the arrival and departure dates.

links

Container for deeplink URL information.

price
includesNonFlightLeg

True if any Leg associated with this Segment is via a non-flight type of transit (Bus, Train or Boat)

legs

Container information on each flight leg.

baggageFees

Container for baggage fee information of each bag type. The baggage fee can vary for each bag type. The amount can be zero, fixed amount or will be in a range.

accountCode

Lists any Account Code that has been applied to this segment.

basicEconomy

True if the corresponding fare ticket type associated with the segment is Basic Economy

seatsLeft

Remaining number of seats available for this segment offer.

fareType

Type of fare.

airportChange

True if there the Segment is having a different Departure airport compared to the Arrival airport of previous Segment.

totalStops

The total number of stops in this segment(Nullable in case of Opaque Flights)

flightDuration

Total duration of the flight segment (Nullable in case of Opaque Flights)

opaqueDepartureTime

Contains the name of the Fare tagged against the specific fare options.

opaqueNumberOfStops

Departure time range will be shown only for opaque flight offers.

Constructors

Link copied to clipboard
public Segment Segment(String segmentId, Integer departureArrivalDayDifference, Map<String, FlightsV3Link> links, OfferPrice price, Boolean includesNonFlightLeg, List<Leg> legs, List<FlightsV3BaggageFee> baggageFees, String accountCode, Boolean basicEconomy, Integer seatsLeft, Segment.FareType fareType, Boolean airportChange, Integer totalStops, String flightDuration, String opaqueDepartureTime, String opaqueNumberOfStops)

Types

Link copied to clipboard
public final class Builder
Link copied to clipboard
public enum FareType extends Enum<Segment.FareType>

Type of fare. Values: NET,PUBLISHED,WEB

Properties

Link copied to clipboard
@Valid()
private final String accountCode
Link copied to clipboard
@Valid()
private final Boolean airportChange
Link copied to clipboard
@Valid()
private final List<FlightsV3BaggageFee> baggageFees
Link copied to clipboard
@Valid()
private final Boolean basicEconomy
Link copied to clipboard
Link copied to clipboard
private final Segment.FareType fareType
Link copied to clipboard
@Valid()
private final String flightDuration
Link copied to clipboard
@Valid()
private final Boolean includesNonFlightLeg
Link copied to clipboard
@Valid()
private final List<Leg> legs
Link copied to clipboard
@Valid()
private final Map<String, FlightsV3Link> links
Link copied to clipboard
@Valid()
private final String opaqueDepartureTime
Link copied to clipboard
@Valid()
private final String opaqueNumberOfStops
Link copied to clipboard
@Valid()
private final OfferPrice price
Link copied to clipboard
private final Integer seatsLeft
Link copied to clipboard
@NotNull()
@Valid()
private final String segmentId
Link copied to clipboard
private final Integer totalStops

Functions

Link copied to clipboard
public final static Segment.Builder builder()
Link copied to clipboard
public final String getAccountCode()
Link copied to clipboard
public final Boolean getAirportChange()
Link copied to clipboard
Link copied to clipboard
public final Boolean getBasicEconomy()
Link copied to clipboard
Link copied to clipboard
public final String getFlightDuration()
Link copied to clipboard
Link copied to clipboard
public final List<Leg> getLegs()
Link copied to clipboard
public final Map<String, FlightsV3Link> getLinks()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public final OfferPrice getPrice()
Link copied to clipboard
public final Integer getSeatsLeft()
Link copied to clipboard
public final String getSegmentId()
Link copied to clipboard
public final Integer getTotalStops()
Link copied to clipboard
public final Segment.Builder toBuilder()