Home Manual Reference Source Test
import Segment from 'FreeBird_SDK/src/SegmentClass.js'
public class | source

Segment

Extends:

Leg → Segment

Direct Subclass:

Slice

Indirect Subclass:

Trip

A segment is one or more consecutive legs on the same flight.The segment(s) constituting the slice.

Test:

Constructor Summary

Public Constructor
public

constructor(duration: number, flight: object, cabin: string, bookingCode: string, bookingCodeCount: number, data: string, leg: object[])

Public Constructors

public constructor(duration: number, flight: object, cabin: string, bookingCode: string, bookingCodeCount: number, data: string, leg: object[]) source

Override:

Leg#constructor

Params:

NameTypeAttributeDescription
duration number

Flight duration

flight object

Flight object having flight details

cabin string

Booked Cabin in the Flight

bookingCode string

The booking code or class for this segment.

bookingCodeCount number

The number of seats available in this booking code on this segment.

data string

[OPTIONAL] any client specific key-value pair specific to segment

leg object[]

Leg object comprising of the details about the hop taken by a flight.Segment can have multiple legs